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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3565de91d91aa284376c29c27be3ac92acb31188 | af0746c13530908dbaa92b5b122c26d760cf9612 | /src/sultanscript/sultan.py | b375b943bb31d562bcdf5e7f9687f9f32fd1c6e1 | [] | no_license | reynardo100/SultanScript | 40a2604853e91a46de8c7d9d610690f649530bc0 | aa36f841dd2fee2daadc90f2e398d547f539684b | refs/heads/master | 2021-01-10T05:04:25.386363 | 2016-02-10T09:01:27 | 2016-02-10T09:01:27 | 50,760,935 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 420 | py | sultan.py | import os
import sys
def sultan():
if len(sys.argv) != 2:
print("Invalid usage. Provide a SultanScript file name to compile and run")
print("Example: Sultan trump_file.tr")
return
if not os.path.isfile(sys.argv[1]):
print("Invalid file specified")
return
... |
1b8471ee91002c640b8853f1cb1567904e779ef5 | cebefb7703d9969941b70def99f584041c8d0daf | /nova_handler.py | e21ed93e277e4503957f4d13b25086f26b8a9fc2 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | hocchudong/ZabbixCeilometer-Proxy | 257e56f8d9c6c8bd106e106599726c602c34e584 | c5aeb2fe9e82c18c80a6d79bd9e51c86ea4e0474 | refs/heads/master | 2021-01-21T02:22:03.164361 | 2016-03-17T07:30:24 | 2016-03-17T07:30:24 | 28,221,225 | 0 | 8 | null | 2016-03-17T04:53:18 | 2014-12-19T08:34:30 | Python | UTF-8 | Python | false | false | 6,743 | py | nova_handler.py | """
Class for Handling Nova events in OpenStack's RabbitMQ/QPID
Uses either pika or proton libraries for handling the AMQP protocol, depending whether the message broker is RabbitMQ or QPID, and then implements
the necessary callbacks for Nova events, such as instance creation/deletion
"""
############# NOTICE... |
297b8eaa0c7952df95df32627b336db605e03d7c | e65bd32f961009383de384d988ac61b5c0e4545d | /public-portfolio-crawler/public_portfolio_crawler/insider_us.py | 8d4b7ff1f066b50dfef0fda5884631f5daa5d0c1 | [] | no_license | justinleoye/crawler-group | 26c6777140a114ddc7737ed14c138091d172fc95 | 3b2dabacf3a543a98fd38568349a9f448948ea6e | refs/heads/master | 2016-09-06T11:49:42.947529 | 2014-04-20T04:00:53 | 2014-04-20T04:00:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,953 | py | insider_us.py | #coding: utf-8
from pyquery import PyQuery as pq
from pyutils import *
from quant_crawler import Crawler
from quant_serviced import serviced
from .utils import *
def fake_us_symbol_service(qd):
for i in ['AAPL']:
yield i
def value_normalize_for_MSN_Money(s):
#print s
if s == 'NA':
retur... |
a56321703af6e537dcdde1903956fbcc8ee932da | 554224b2b4c13cfb47214db5a13f65dec00eb4e9 | /Email/main.py | 7b811090e9c2574e0d80a276bd518269c696a7cd | [] | no_license | vlaghecof/Scrapers | d507ca50f1534a3817081ed955a05a0c9cda90ec | bf98cef629925ea7068d176a5522a9873a311aed | refs/heads/master | 2023-09-03T21:15:30.207867 | 2021-10-18T18:55:53 | 2021-10-18T18:55:53 | 295,452,302 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,214 | py | main.py | import smtplib, ssl
#
# port = 465 # For SSL
# smtp_server = "smtp.gmail.com"
# sender_email = "automateemailtestcv@gmail.com" # Enter your address
# receiver_email = "vladcofaru@gmail.com" # Enter receiver address
# password = input("Type your password and press enter: ")
# message = """\
# Subject: Hi there
#
# ... |
ac4582f2835e19cc3926fe0ecaab52136ac8fa23 | 633fd137f857af73199e4272fd31b2915d5024a0 | /sig_sample.py | 607af0f740eb1eb8fba745f6049d90a547973997 | [] | no_license | mrh929/qrcode_signature | 48a363c61be575915f2b4406f41019b0f7177106 | f9aaf0b6654b4e1f6f244f2986a0666cab624251 | refs/heads/master | 2020-09-24T13:38:02.099867 | 2019-12-24T09:41:16 | 2019-12-24T09:41:16 | 225,770,457 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,020 | py | sig_sample.py | if __name__ == '__main__':
private_key = '''-----BEGIN PRIVATE KEY-----
MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEAyQDti8YVmfrAIm6Pm3XN3MZWRH0XiIVqRC6nmdd0twDayZ3epsHbB/RBOM7QOxYRDBqUv8F9vlrBdWYnyey6iQIDAQABAkA2JGbYEIo/CLj6TVenY2sJPe980Ukmf/Fo3jxNByksJbdjFJx6a3iyP8G3GSjj5wKdO/yG4+xEfQvw+rr103rVAiEA7/keSShXBm... |
2a8b7e86e85b7005b21a95979545812b8cac332a | 5e50e185ff9e5cf0a755a818c3b2e19c550cb697 | /schmactions/many_orbits_real/calc_many_orbits.py | db6529684b8b363e1f6dc2a7e6a08506bc2a5c47 | [] | no_license | astrorobyn/actions_systematic | b2431cc2a34020cb46caab88801e57302a9c02e3 | 78cc6e4af3671e10574e270ddbb4c520cf89e955 | refs/heads/master | 2020-06-23T00:42:12.719081 | 2019-07-26T16:32:00 | 2019-07-26T16:32:00 | 198,448,463 | 0 | 0 | null | 2019-07-23T14:34:44 | 2019-07-23T14:34:43 | null | UTF-8 | Python | false | false | 1,272 | py | calc_many_orbits.py | import sys
sys.path.append('../')
import numpy as np
from schmactions import schmactions
from schmactions import compute_offset_list
import astropy.units as u
import pickle
from astropy.table import Table
nproc = 40
t = Table.read('real_cluster_gc.fits', format='fits')
posx = t['pos.x'].astype('float').tolist()
po... |
71626673140ec8a6f54567105187e212a216f1a9 | 8106add6aa030d36dafcc61f54c09b2c596e68c1 | /drivers/STM32_F1xx_STD_Drivers/SConscript | af54f3ed61dccfceadac0c6d78d935378038e0ef | [
"Apache-2.0"
] | permissive | ghsecuritylab/RTT_NONOS | 92a4948c3253635f29d5e4d5213869c2d281c850 | 1510a64b683686a3b25fb6b5f781d235b4eb107d | refs/heads/master | 2021-02-28T14:35:15.645023 | 2019-07-08T14:29:47 | 2019-07-08T14:29:47 | 245,705,582 | 0 | 0 | null | 2020-03-07T21:06:48 | 2020-03-07T21:06:47 | null | UTF-8 | Python | false | false | 365 | SConscript | Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
# add the general drivers.
src = Split("""
drv_usart.c
""")
src += ['drv_common.c']
path = [cwd]
path += [cwd + '/config']
if GetDepend('BSP_USING_ON_CHIP_FLASH'):
src += ['drv_flash.c']
group = DefineGroup('Drivers', src, dep... | |
16e179bb9c8603239cfa9fcb6b6bee88d1b33a2c | c7b5d7948f02986946323b87e0d5882a374603f7 | /paramDecoder.py | 24d64976cccb1a7a54805d929c239d6f06049f4f | [] | no_license | sacrtap/raspberry_python | 1b901ff06c6f379ab057e3ea2339a0c23ddc7a85 | 6eb1c6eb68de076535dcaeaed7e4614136026647 | refs/heads/master | 2021-01-18T15:30:05.832052 | 2017-04-25T08:46:09 | 2017-04-25T08:46:09 | 86,656,934 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,284 | py | paramDecoder.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2017/4/19 10:58
# @Author : Aries
# @Site :
# @File : paramDecoder.py
# @Software: PyCharm
import json
import logging
import logging.config
class FreeDecoder:
def __init__(self, _json):
self.jsonParam = json.loads(_json)
def getDirect... |
1b30b41d877d1d57f8606209fd700e3705345526 | c5f7019c52cd91a3d9505943b9d866539f2fb0bc | /synapse/tests/test_tools_autodoc.py | b3df74ee69937188d2609df5930d12ab9ec58e66 | [
"Apache-2.0"
] | permissive | vertexproject/synapse | ce31699fcb10cb2c870d448915f4d4524247e2d0 | 1808dff78921b4bfdb451a12ee5d03427a5295b9 | refs/heads/master | 2023-09-03T23:48:26.584015 | 2023-08-31T20:34:35 | 2023-08-31T20:34:35 | 37,228,107 | 307 | 63 | Apache-2.0 | 2023-09-14T21:53:32 | 2015-06-10T23:29:41 | Python | UTF-8 | Python | false | false | 7,173 | py | test_tools_autodoc.py | import synapse.common as s_common
import synapse.tests.files as s_t_files
import synapse.tests.utils as s_t_utils
import synapse.tools.autodoc as s_autodoc
class TestAutoDoc(s_t_utils.SynTest):
async def test_tools_autodoc_docmodel(self):
with self.getTestDir() as path:
argv = ['--doc-mode... |
a47e6c157a88ea8624c946dc5858e4f7fe8f3e73 | 16ee65e5467c7bb0abc84d9a810e2984aa608073 | /python-crash-course/exercises/chapter-4/4-2-animals.py | 40b34e366b89f7354e90c785b863728bbeb3dda4 | [] | no_license | dansoh/python-intro | cfcf659081ff2e250b975efc805248a98b6f25da | e086ee90e29b7cb7766fb4387780b43753f5f806 | refs/heads/master | 2018-07-11T04:32:50.230920 | 2018-06-01T07:45:55 | 2018-06-01T07:45:55 | 119,454,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | 4-2-animals.py | animals = ['tiger', 'jaguar', 'panther']
for animal in animals:
print("At the zoo I saw a " + animal + ".\n")
print("All these animals are magnificent creatures")
|
964d70040f4120268a602129f0cb919ba24c7f5e | c7ef4cba2de4d66545f668f174389b0d5108a7c3 | /5.Medium/Rearrange_Array_Alternately.py | 654da97181446a62bdc34800ed84221cf8c7ccae | [] | no_license | Lovelyjha/GeeksforGeeks | 69f7d93270bfcd3d3f6b9964e26ac62b31a8239c | 1889ee155e69bfb13d49b4bce9bb8af662de1bb3 | refs/heads/master | 2022-12-10T06:46:39.921959 | 2020-08-27T02:11:04 | 2020-08-27T02:11:04 | 264,970,684 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | Rearrange_Array_Alternately.py | def Rearrange(arrl,n):
max=n-1
min=0
arr=[0 for i in range(n)]
for i in range(n):
if i%2!=0:
arr[i]=arrl[min]
min+=1
else:
arr[i]=arrl[max]
max-=1
for k in range(n):
print(arr[k],end=" ")
print()
... |
93544dda3685c8e43821c79bce5bcd6efd13f1a7 | 5611e3610d3c1d2c6e8d46c6b8a76200e968ab21 | /src/dynamic_embedding/line_new.py | 4d96c964be27d5436d9eca53c0d4d28c26b8ddd5 | [] | no_license | luke28/DNE | aec27f9dae37d2b7a0f35add95120a3e66295c7e | 694ef7cc57b6e833106720189b84c84b2da037a9 | refs/heads/master | 2018-12-19T13:14:37.207342 | 2018-09-16T02:29:31 | 2018-09-16T02:29:31 | 115,335,748 | 8 | 3 | null | null | null | null | UTF-8 | Python | false | false | 3,941 | py | line_new.py | import numpy as np
import tensorflow as tf
import math
from utils.env import *
from utils.data_handler import DataHandler as dh
class NodeEmbedding(object):
def __init__(self, params, init_embeddings, init_weights, G, new_id):
self.num_nodes, self.embedding_size = init_embeddings.shape
self.batch_... |
c7a436302bc8ed679578146a44a44080796c159e | 0ae5b5675412ecfa80eabe5fd077e2df6fc15f2e | /kea2/plugin/skip_newer.py | 2d81df3926afcce24091c48936818556a8a6b39b | [] | no_license | mfiers/kea2 | a1734bf86b062d682382c849fb8d065d18ce7ad5 | 38495766ac4ee7d60742f2ef7005f08684fa9491 | refs/heads/master | 2021-01-13T01:54:29.357129 | 2015-10-25T06:09:18 | 2015-10-25T06:09:18 | 38,741,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,566 | py | skip_newer.py |
from itertools import chain
import os
from pprint import pprint
import re
import time
from path import Path
from kea2.util import register_hook
from kea2.log import get_logger
lg = get_logger(__name__, 'info')
find_inout = re.compile(r'{([ioxd])(?: ([A-Za-z][\w]*))?}')
def file_time_report(ot, idxt):
oldest_o... |
1686108229a3d519597bb2e82bedf8a1af7c52ef | 421b0ae45f495110daec64ed98c31af525585c2c | /BasicPrograms/call.py | e89bd5fc44376a6ea2fb1b7d970219b9c456cf2c | [] | no_license | Pradeepsuthar/pythonCode | a2c87fb64c79edd11be54c2015f9413ddce246c4 | 14e2b397f69b3fbebde5b3af98898c4ff750c28c | refs/heads/master | 2021-02-18T05:07:40.402466 | 2020-03-05T13:14:15 | 2020-03-05T13:14:15 | 245,163,673 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 131 | py | call.py | import math
duration = 120
rate = 1.5
min = math.ceil(duration/60)
cost = rate*min
print("Cost of call Rs.",cost,"per minute") |
57623821565662cddd91e9e490a83dd74e2e3f44 | 5d91677c27f151c28085e8dcfaaba0e5cc7c5c65 | /photonai/modelwrapper/PhotonOneClassSVM.py | 93056dc6333f095755db1ad50f225f7ffa7dc8d6 | [] | no_license | bcottman/photon | 4780d718aa1d6a266a3afaf2784865908da562e7 | 5e2a2996bdae632c92a3bb8f891cfac81c65380d | refs/heads/photon_dev | 2021-03-10T04:42:07.980175 | 2020-06-12T21:15:59 | 2020-06-12T21:15:59 | 246,419,638 | 7 | 2 | null | 2020-06-12T21:16:01 | 2020-03-10T22:16:11 | HTML | UTF-8 | Python | false | false | 1,221 | py | PhotonOneClassSVM.py | from sklearn.base import BaseEstimator, ClassifierMixin
from sklearn.svm import OneClassSVM
from sklearn.metrics import accuracy_score
import numpy as np
class PhotonOneClassSVM(BaseEstimator, ClassifierMixin):
def __init__(self, kernel="rbf", nu=0.5):
self.kernel = kernel
self.nu = nu
sel... |
265e0505f350286c522b7e0bf12abc9f8d81e056 | 9d6488774ccf398a2ff5c02b778b128143b397f5 | /task2.part3.py | c67a4b1f24e4f4279b67752449195bbd5aabe86e | [] | no_license | kayevbb/part3 | 53a204d0ece304cba1da83d7b70e8793389f3a33 | 278efe92bb040cdb9fe8ac086a27614fae40df06 | refs/heads/master | 2020-09-06T11:59:00.022855 | 2019-11-08T08:08:00 | 2019-11-08T08:08:00 | 220,417,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 246 | py | task2.part3.py | words = input("Введите любые слова через пробелы: ").split() # в список
sort_func = sorted(words, key=len) #сортирует
con_to_str = " ".join(sort_func) #убирает кавычки
print(con_to_str) |
642b12cbfcefbc846ebaa05027c5ea4434e0740a | 34ed4289e2b96aa42d410cb3384f6fb424ba63d7 | /app.py | ca23726d8960ee42776e73bc399dc769acfdefe1 | [] | no_license | confragus/dokku | c96fc3f8ff6a9ff48232f29c951bcbbc624bb08d | d270310d8641c28d2b65b346bc64eae222aadd03 | refs/heads/master | 2020-03-20T23:15:45.978850 | 2018-07-07T11:07:34 | 2018-07-07T11:07:34 | 137,838,142 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,256 | py | app.py | import os
from mycode import csv_json, cmc_flat, cmc_json
import requests
from flask import Flask, render_template, send_from_directory
from flask_cors import CORS
# Import question list
questions = csv_json('db/questionlist2.csv')
# web app
app = Flask(__name__, static_url_path='')
CORS(app)
@app.route('/')
def ... |
9ed93efc3ba2854b650b72f4d5797dd4168c762a | 9d5fc634eff23c0c6ae458cfa1c797c5075693b8 | /src/week2/Dict_2.py | 71fd4e33a7241d554657e0a29c8bd659b0c60020 | [] | no_license | DiagonalMatrix/pcap | 8843c21c7ce3bc3322cec67832a451ee464bbc39 | 1a694db5af920aa413782ccc74f3d66488e0a90e | refs/heads/main | 2023-03-23T16:50:30.692340 | 2021-03-09T21:52:36 | 2021-03-09T21:52:36 | 338,768,429 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,180 | py | Dict_2.py | # Adding new element to Keys
dict = {'name':'Srujan',
'id': [1,2,3],
'postcode': 100}
dict['location'] = 'Reading'
print(dict)
# {'name': 'Srujan', 'id': [1, 2, 3], 'postcode': 100, 'location': 'Reading'}
dict['name'] = 'Ram'
# {'name': 'Ram', 'id': [1, 2, 3], 'postcode': 100, 'location': 'Reading'}
... |
18819c7f4640487584d21e8a6e4d84cae15dbbe2 | 23130cd12e38dbce8db8102810edaad70b240ae2 | /lintcode/393.2.py | 3939e8fdc80e1fdceed3b77b05d39793704a4f43 | [
"MIT"
] | permissive | kangli-bionic/algorithm | ee6687c82101088db20f10fb958b4e45e97d3d31 | c3c38723b9c5f1cc745550d89e228f92fd4abfb2 | refs/heads/master | 2023-01-05T09:29:33.204253 | 2020-10-25T17:29:38 | 2020-10-25T17:29:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,507 | py | 393.2.py | """
393. Best Time to Buy and Sell Stock IV
dp[i][k][0] = max(dp[i - 1][k][0], dp[i - 1][k][1] + prices[i])
dp[i][k][1] = max(dp[i - 1][k][1], dp[i - 1][k - 1][0] - prices[i])
dp[-1][k][0] = 0
dp[-1][k][1] = -sys.maxsize
dp[i][0][0] = 0
dp[i][0][1] = -sys.maxsize
reference: https://leetcode.com/problems/best-time-to... |
32d499c5bfb8a1ad0a0d5b16ca7bbb6b8de42edd | 7126e37f549e6655d5d35442ecb4a894a9c819d4 | /SQLAchemy/config.py | 7f40d5165a2fd4ebe8fd9d5b7821c6ea9cb49d2e | [] | no_license | lgalicki/flask-studies | 821473204b20710685fc78185c53fc32f4f83857 | 964067de4fe599232261af5f5a745242781bfb0b | refs/heads/master | 2022-12-13T11:54:55.883832 | 2020-05-03T22:09:12 | 2020-05-03T22:09:12 | 242,836,829 | 0 | 0 | null | 2022-12-08T03:48:01 | 2020-02-24T20:31:36 | Python | UTF-8 | Python | false | false | 205 | py | config.py | from mysql_credentials import MysqlCredentials as dbc
SQLALCHEMY_DATABASE_URI = f'mysql+pymysql://{dbc.user}:{dbc.password}@localhost/sqlalchemy_flask'
SQLALCHEMY_TRACK_MODIFICATIONS = False
DEBUG = True
|
dbf28ab470d48b2d47b8004e697075408c4662e3 | 4b1d58ec4f82302179d29b5081e7046d259e94e9 | /design_patterns/solid/ocp.py | b475b9d63f8bd08d379b761af3fa2478883d16ba | [] | no_license | BarbaraRafal/SDA_exercises | 3565674e4896366b4c062d300d497ed624eb5178 | 4695903eec432ddee287f1cb06c54c3c4b04f8e0 | refs/heads/master | 2023-04-02T05:15:27.388434 | 2021-04-12T08:45:34 | 2021-04-12T08:45:34 | 344,878,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,927 | py | ocp.py | # OCP - Open-Close Principle
from enum import Enum
class Color(Enum):
RED = 1
GREEN = 2
BLUE = 3
class Size(Enum):
SMALL = 1
MEDIUM = 2
LARGE = 3
class Product:
def __init__(self, name, color, size):
self.name = name
self.color = color
self.size = size
apple =... |
1ece23e3a22096f7b7fd111db2546da7b9834227 | ae3ee35aa31b2715fbaf935c3aaa2a16f3c92e4a | /src/parse/parse_embed.py | d460050f253b6c5153f014d735a14214f33ea29e | [] | no_license | mattscchan/DotaChatBot | f1619ab24fc5348c457ed2752be11ee0990631d0 | 333f0b2f094a9b08a2bf4562d7837c02af12471d | refs/heads/master | 2021-08-31T16:57:30.248009 | 2017-12-22T04:37:18 | 2017-12-22T04:37:18 | 109,139,521 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 747 | py | parse_embed.py | import tensorflow as tf
import xml.etree.ElementTree as ET
import argparse
import re
def main(args):
tree = ET.parse(args.filename)
csv_file = re.sub(r'\.xml', '.csv', args.filename)
xml_root = tree.getroot()
new_arr = []
count = 0
for convo in xml_root:
new_convo = []
for utterance in convo:
if utteranc... |
6278d99ece678a12624aeb4e1efa645e9d57fbf7 | 28e2a38efb3b6233a1a14d54540a7a320ccf4183 | /sift_polyphen/addtotable_polyphen.py | 5c374012ada67fb0556e757c5fccb738a8f807d1 | [] | no_license | adriangarciarecio/TMSNP | 4732dd0fd20a40c672eb4dccd715c26b2aeb68ad | 6a207e09853b2fd3850d16a3d279dae3b4b543dd | refs/heads/master | 2023-01-07T01:30:10.618074 | 2020-11-10T10:52:13 | 2020-11-10T10:52:13 | 281,094,892 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,426 | py | addtotable_polyphen.py | #!/usr/bin/env python
# Takes the TMs from the MySQL tabe
import mysql.connector
import sqlalchemy
import os
import pandas as pd
import numpy as np
import sqlalchemy as sql
# Set the connection
# engine = sql.create_engine(
# f"mysql://lmcdb:{os.getenv('LMCDB_PASS')}@alf03.uab.cat/tmsnp"
# )
engine = sql.create_... |
1ecd84b6847e34b96f1b1ca183c68d7b09712d66 | 735b98d054672adefacb0200a9b76a2142ff5be0 | /img-parser/main.py | 0b09cd578974e376294b43cc78388841c7a1fbe7 | [] | no_license | TaleStorm/TS_UX_HGO | ead758356c522178fead05ad855dab131ccd0d20 | 99dc8fe917cf8e547fc2404114c8f3148f9bcea3 | refs/heads/main | 2023-04-15T17:39:37.545347 | 2021-04-18T09:02:39 | 2021-04-18T09:02:39 | 359,079,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 804 | py | main.py | import cv2 as cv
import pytesseract
import sys
# Adding custom options
custom_config = r'--oem 3 --psm 6'
x = y = 0
h = 40
w = 1080
file_path = sys.argv[1] if len(sys.argv) > 1 else 'data.txt'
video_path = sys.argv[2] if len(sys.argv) > 2 else 'test_video.mp4'
with open(file_path, 'w') as result_file:
vidcap = cv.... |
56435f7caba5d70afa15576a40d0f56830db8fc6 | 56f325286066e7d734b8dadad25079b63c800ce6 | /2-14/076-Minimum-Window-Substring.py | 9ac92ae624f5d3b5fa8f4760fbf4adfe56dd476f | [] | no_license | whalejasmine/leetcode_python_summary | fabffeeebc3fe179bc07dd04d588ed08e66791ed | eb3fc22450b362703c3322d9e975d191eb324ffc | refs/heads/master | 2020-04-13T12:48:22.588175 | 2019-03-08T20:29:12 | 2019-03-08T20:29:12 | 163,212,481 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,866 | py | 076-Minimum-Window-Substring.py | # Method 1 two pointer
# Time Complexity: O(|S| + |T|)O(∣S∣+∣T∣) where |S| and |T| represent the lengths of strings S and T. In the worst case we might end up visiting every element of string SS twice, once by left pointer and once by right pointer. |T|∣T∣ represents the length of string TT.
# Space Complexity: O(|S| ... |
08db04eabd1ca58934da2ef3e4e5453cf791eac3 | f52a411a2fd1f0c5e9175ce0274dc8b361bc6460 | /sockets/server.py | 086b6f2f4f360c7846e359bc483c2f1faccbaf9e | [] | no_license | xahiddin/MyPython | 8bb47528db47191ec726ac6af7b73bbca9719ef4 | 6ead5fa8dcb0ebf91dfded2ca5b6f35a9a49f806 | refs/heads/master | 2021-07-13T23:56:31.169611 | 2017-10-17T16:45:47 | 2017-10-17T16:45:47 | 105,096,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 733 | py | server.py | from socket import *
from time import *
import os
host = ''
port = 520
bufsize = 1024
addr = (host, port)
sersock = socket(AF_INET, SOCK_STREAM)
sersock.bind(addr)
sersock.listen(5)
def getstatus(cmd):
info = os.popen(cmd)
info_text = info.read()
info_status = info.close()
return info_text, info_sta... |
b15f2681f7845e1c3b211aa29c853712e77cdc76 | dd6e155b4cce32a000f671f1b9d18d8dcd618876 | /05_text_matching/sbert.py | 3fbacd9e8322c5298fd94ed1cf3d5e8d0f569a55 | [
"Apache-2.0",
"Python-2.0"
] | permissive | zhanghaok/nlp-tutorial-1 | 0e0d26c62cf1789e0811049e31e758b28eed86d1 | 041ce6c671876d7b4f820cfaa162914280400a58 | refs/heads/main | 2023-09-03T19:42:02.308948 | 2021-10-21T07:29:56 | 2021-10-21T07:29:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,327 | py | sbert.py | # -*- coding: utf-8 -*-
"""
@author:XuMing(xuming624@qq.com)
@description:
"""
# # BERT
#
# In this notebook we'll take a look at how we can use transformer models (like BERT) to create sentence vectors for calculating similarity. Let's start by defining a few example sentences.
# In[1]:
import os
os.environ["KMP_D... |
a29b6b09b3d8194fee64f1131eeaea030bd2fe3e | 93a07f2ed405e8e9f60e1da2f83ccd1240027309 | /SZR/tests/test_celery.py | 1441968c2cdc8e20fff77b22effce44598d73ac6 | [
"MIT"
] | permissive | Alek96/SZR | 5413e50ec780638b1bd75ee0891a1ef2ee6645fe | 6c736cded0c6de88b6e4fc5a207273ec1024365b | refs/heads/development | 2020-04-12T09:45:58.353841 | 2019-05-11T11:35:49 | 2019-05-11T11:35:49 | 162,407,038 | 1 | 0 | MIT | 2019-05-11T11:35:51 | 2018-12-19T08:32:32 | Python | UTF-8 | Python | false | false | 345 | py | test_celery.py | from django.test import TestCase
from SZR.celery import debug_task
from core.utils import captured_output
class CeleryTest(TestCase):
def test_debug_task(self):
with captured_output() as (out, err):
result = debug_task.delay()
self.assertIn(result.id, out.read())
self.assertT... |
137f54c1567b4351069356b4c518161372149c14 | 5c5b34f6f598a43ddfbd473228737a27c26d1d8e | /104_ 二叉树的最大深度.py | 329779549f23754b84e823479ef40750e376a1a1 | [] | no_license | lovehhf/LeetCode | 34a1bc140b10dc83a32ef9a70f9c73176948a9c4 | 5d3574ccd282d0146c83c286ae28d8baaabd4910 | refs/heads/master | 2021-11-04T04:52:34.518621 | 2021-10-26T15:34:47 | 2021-10-26T15:34:47 | 173,673,492 | 0 | 0 | null | 2020-03-03T14:54:09 | 2019-03-04T04:26:15 | Python | UTF-8 | Python | false | false | 735 | py | 104_ 二叉树的最大深度.py | # -*- coding:utf-8 -*-
__author__ = 'huanghf'
"""
给定一个二叉树,找出其最大深度。
二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。
说明: 叶子节点是指没有子节点的节点。
示例:
给定二叉树 [3,9,20,null,null,15,7],
3
/ \
9 20
/ \
15 7
返回它的最大深度 3 。
"""
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
... |
37d9ba58928f0faa939e4c3880f856ffb510d9e2 | de7a1ce43bdc169285020940960668189e5a924e | /Actions_Iframes_javascripthandler/jsalert_handle.py | 3385dde9e124027263853c502abb52b7114fd744 | [] | no_license | waquar/Selenium_Python | 7d2b02f3a6278e5c29cffa64ff14a1a4b6a13266 | e420d1834e82029c67a8c9e400bfbb510da654a2 | refs/heads/master | 2020-07-06T19:36:16.040786 | 2019-09-24T10:51:10 | 2019-09-24T10:51:10 | 203,119,390 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 867 | py | jsalert_handle.py | from selenium import webdriver
from selenium.webdriver.common.by import By
import time
import os
path= "D:\\Selenium_Addon_Files\\chromedriver.exe"
class javascriptsalert():
def test(self):
os.environ["webdriver.chrome.driver"] = path
driver = webdriver.Chrome(path)
driver.set_window_posit... |
a40b1626324565e4f58c6d5f0bbc8a75f22ee61b | bd1c88616f2a86088a918acf97e9ff924bef8e68 | /myproject/my_file_opration/study_file.py | 325aafd72c75e2e8ab7fc61b7c1c8a4ea00183b0 | [] | no_license | 209364619/myproject | 5c1dcac4825491da16335651429feed9d94c75c8 | 6bb9d55b623c2d249bd93347192ea3bb3928db9a | refs/heads/master | 2020-04-08T22:14:12.814055 | 2019-04-24T01:09:19 | 2019-04-24T01:09:19 | 159,776,743 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 754 | py | study_file.py | # coding=utf-8
import time
import json
'''
python 文件读写操作
使用 open() 方法一定要保证关闭文件对象,即调用 close() 方法。
'''
def write():
f = open("test.txt", 'w')
for i in range(10):
current = time.asctime(time.localtime())
dict = {}
dict['time'] = current
f.write(json.dumps(dict) + '\n')
... |
83fdd8a17b534a5d5d98c221eb67356c0918dfcb | f39590573307a87a2092282a686fccae9dd15b06 | /practice/linked_list_intersection.py | 5f616ee47230a5927205e301b16ac56cde194d26 | [] | no_license | dwipam/code | dec1e8df712af029da370ad231382bbf50140318 | 0426e9bf4be48b6ff78dcc17f42f452f40a4e812 | refs/heads/master | 2021-01-18T02:23:38.642813 | 2020-03-29T07:26:13 | 2020-03-29T07:26:13 | 45,200,803 | 7 | 8 | null | 2020-03-29T07:26:14 | 2015-10-29T17:50:53 | HTML | UTF-8 | Python | false | false | 866 | py | linked_list_intersection.py | class Node:
def __init__(self, key):
self.key = key
self.next = None
self.visited = None
class LinkedList:
def __init__(self):
self.head = None
def push(self, key):
n = Node(key)
n.next = self.head
self.head = n
def traverse(self):
temp = self.head
while temp:
print temp.key
temp = temp.n... |
f64e3f659f20a7b23abab5c3e632f4877d99a29c | f0814077f9b910447a77c533c6ce3a00e5feef4a | /test.py | e54687570eeb75e88d88c6f38277a89e4c18a073 | [] | no_license | ekholm81/13_python | ce47d1a7485979bc718de66c275264417aa20878 | b95d4c38ce0c753ab3db568a7d129d55a9dffb41 | refs/heads/master | 2020-03-30T16:06:54.254785 | 2016-02-20T18:53:16 | 2016-02-20T18:53:16 | 33,893,350 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,170 | py | test.py | import sys
import math
import time
from random import randint
import random
def same_sign(a,b):
if b==0:
return (a==0 or a==3 or a==4 or a==6)
if b==1:
return (a==1 or a==3 or a==5 or a==6)
if b==2:
return (a==2 or a==4 or a==5 or a==6)
def in_row(msys,row):
if not same_sign(msys[0],row[0]):
return False
... |
000fb640dd1d2bc081d0b96d4bb00ca4f0bae192 | 2945d7efdb5a30db504952270f465c6c290ce9b9 | /question3.py | 82b01b9eea5ed18941eb575db65f17bec111f387 | [] | no_license | ellyzyaory/Modularization | 953e9885d9325c2cb02d637e1320cd30a26689d4 | 595e0eaa9ddd9fdc1f959bbc6099c52f49c3923c | refs/heads/main | 2023-01-02T19:40:37.008013 | 2020-10-15T08:02:00 | 2020-10-15T08:02:00 | 304,248,267 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | question3.py | import calendar
def text_calendar(yy, mm):
return calendar.month(yy, mm, 0, 1)
if __name__ == "__main__":
year = int(input("Enter the year : "))
month = int(input("Enter the month: "))
print(text_calendar(year, month))
|
a5e3fab5c6064cf1c50a1be5db91da3a5551538b | f392e1ccaaf37ef5a6e1212e152aa440075b1eb7 | /Google/Code-Jam-2017/Qualification/Bathroom Stalls.py | 7ade9877bd83620bfb26e75bd9155817cefd5790 | [] | no_license | Milan1998/Competitive-Programming | 0843c4763460ad937e5867fce92d18fb28934e73 | 0973435300f7d85b31c4370e81a9c170e7322fd2 | refs/heads/master | 2021-05-08T10:19:46.716034 | 2018-02-19T11:39:51 | 2018-02-19T11:39:51 | 119,837,896 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 480 | py | Bathroom Stalls.py | import heapq
c = 1
for _ in range(int(input())):
n, k = [int(i) for i in input().split(" ")]
h = [[-(n - 1) - 1, 1, n]]
for i in range(k):
p = heapq.heappop(h)
sz = -p[0]
l = p[1]
r = p[2]
m = (r + l) // 2
ls = -(-(m - l - 1) - 1)
rs = -(-(r - (m + 1)) - 1)
x = [-ls, l, m - 1]
y = [... |
ffbb7f387ebebc550f95ad8188e77fb6f2af4eec | 7bb623ca7d1d66b8f9de826ce5a021342c8d381f | /server.py | 481f5dccfc765db8c016353c6282815ab60fd1a3 | [] | no_license | maksymsagadin/Client-and-Server | b8a142f0b72f45881aa3d5ae62ff8a46eb95b465 | 6c28adc8ad0470e1ee8f180e071f5bf519a40f8a | refs/heads/master | 2022-04-09T00:21:34.089561 | 2020-03-02T07:04:54 | 2020-03-02T07:04:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,049 | py | server.py | '''
Maksym Sagadin
Sergio Chairez
'''
import socket
import threading
import os
import pickle
import sys
HOST = "127.0.0.1"
PORT = 5551
BUFFER_SIZE = 1024
def validate_cmd_arg():
"""
validates that the argument passed in via the terminal
is an integer and returns the amount of ports to designate later ... |
15f702b2692ce4f628c7a2f72c6f8e49ab653e4a | 04803c70bb97012b7d500a177ac0240fb2ddbe38 | /1heptane/pdep/network4220_1.py | c43c32330dbb003071fded0ef8d57062817a6f03 | [] | no_license | shenghuiqin/chpd | 735e0415f6688d88579fc935459c1b0f53596d1d | 396ba54629036e3f2be0b3fabe09b78c90d56939 | refs/heads/master | 2023-03-01T23:29:02.118150 | 2019-10-05T04:02:23 | 2019-10-05T04:02:23 | 192,084,217 | 0 | 0 | null | 2019-06-18T18:33:13 | 2019-06-15T13:52:28 | HTML | UTF-8 | Python | false | false | 103,749 | py | network4220_1.py | species(
label = 'C=C([CH]C)O[CH]C=O(24163)',
structure = SMILES('[CH2]C(=CC)OC=C[O]'),
E0 = (-16.4167,'kJ/mol'),
modes = [
HarmonicOscillator(frequencies=([350,440,435,1725,2750,2800,2850,1350,1500,750,1050,1375,1000,3000,3100,440,815,1455,1000,2995,3010,3025,975,987.5,1000,1300,1337.5,1375,400... |
df4f897358bf15acd22be7b95db0cb5007fe638d | bd1b1fda138e6687dadc57317c3e312bc8872600 | /mycode/lintcode/Subsets.py | e1e206b4974a7f9388ef236f1858e8eb539ecde2 | [] | no_license | dundunmao/lint_leet | fc185038f57e0c5cbb82a74cebd4fe00422416cb | 5788bd7b154649d2f787bbc4feb717ff2f4b4c59 | refs/heads/master | 2020-11-30T04:56:25.553327 | 2017-10-22T07:11:01 | 2017-10-22T07:11:01 | 96,705,212 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 642 | py | Subsets.py | # -*- encoding: utf-8 -*-
# 题目:无重复的set, 求subsets
# 例如:input:[1,2,3]
# output:
# [
# [3],
# [1],
# [2],
# [1,2,3],
# [1,3],
# [2,3],
# [1,2],
# []
# ]
class Solution:
def search(self, nums, S, index):
if index == len(nums):
self.results.append(S)
return
se... |
6021d5d8013c4639c33c3ad43df26bc75050c845 | 2da507921e5a9ec3161a68525c1d136b25516f00 | /Combinations.py | 021dac54af1fed4a4d8ee9f2669966ea1baa4f08 | [] | no_license | lfdyf20/Leetcode | 0de5c0c3f83acd99ba2d32a46f66a60cecae238c | 11c8fc663888b48b5417256aab1bf872190267ba | refs/heads/master | 2021-08-15T03:08:18.825773 | 2021-07-28T02:49:43 | 2021-07-28T02:49:43 | 71,601,758 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,354 | py | Combinations.py | from itertools import combinations
class Solution(object):
def combine(self, n, k):
"""
:type n: int
:type k: int
:rtype: List[List[int]]
"""
# return [ [i] + p
# for i in range(1, n+1)
# for p in self.combine( i-1, k-1) ] or [[]]
if k... |
0934fb81208173a7958c107b1426fa447676193d | 0e7543e17ef80012610d40b206ccf57f339cfe04 | /day_6/main.py | 3f34913b6c3128661a1a34c52f0c7614f089846f | [] | no_license | Zeratoxx/adventOfCode2020 | 36c59d80b1c1814e3e7cd6034fbfd4bfe6dbebce | 60e51af9c830a9ff6efa3c500a5e872c8a3471c1 | refs/heads/main | 2023-01-27T18:42:08.686967 | 2020-12-07T16:59:30 | 2020-12-07T16:59:30 | 317,911,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,145 | py | main.py | from day_6.group import Group
def get_data(input_path):
data = []
with open(input_path, "r") as inputFile:
group = []
is_added = False
for line in inputFile.read().splitlines():
if line == '':
data.append(group)
is_added = True
... |
2e5b10c022cd334697a8db416db507bb9d6294eb | 0398bcdb0d70cdc850154c4845319e0e61b7340d | /Controler/Test.py | 743b1d8199d9cbb304069b10cb5faa889f5be8d9 | [] | no_license | NguyenCuong1411060036/DoAnTotNghiep | 07a026a331c9ef289316e72753cc9bf0b6895a02 | c0d72e0d3ca9272bb65cd3ae137466adc9d1b5e3 | refs/heads/master | 2022-10-21T14:56:10.627469 | 2018-08-19T04:16:54 | 2018-08-19T04:16:54 | 132,233,842 | 0 | 1 | null | 2022-10-06T04:09:08 | 2018-05-05T09:32:37 | Python | UTF-8 | Python | false | false | 669 | py | Test.py | import sys
from PyQt5 import QtWidgets, QtCore
from Controler.Export_CSV import Export_DiemDanh
class Window(QtWidgets.QMainWindow):
def __init__(self):
super(Window, self).__init__()
self.setGeometry(50, 50, 500, 300)
self.setWindowTitle("PyQT tuts!")
self.file_save()
def fi... |
4fd75acd06d4444528ba426f189be9876287e73d | 2bf9e2faf14c967088c57772ec49dfccad0ffad4 | /Project/jvk27_hw4/CG_hw4 | c87fb9db4a667c8e5f5567750243f5c7b9ea8fba | [] | no_license | JulianKemmerer/Drexel-CS536 | 1f84f41aee2a80f5557718490077e9dc7e26f46a | e07b6fcfdeb7044dbf22e316baf91d20848ca53f | refs/heads/master | 2016-09-07T18:44:08.927501 | 2014-06-16T20:13:20 | 2014-06-16T20:13:20 | 20,899,090 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,860 | CG_hw4 | #!/usr/bin/env python
import sys
import global_vars
import cmd_line
import smf
import geometry
import matrix
import xpm
def main():
#Parse commandline into globals
cmd_line.parse(sys.argv)
#Parse smf files into smf models
smf_models = smf.get_smf_models([global_vars.smf_file])
#Get normalizing tranformation m... | |
477afbeb6ff96a919b28596b820f612d93d24316 | dc568af8437fa9307f4e0e52bc38f9225f54f01f | /python/snapy/netsnmp/unittests/__init__.py | 4a270b7d5568667b39eb1ed26f200856cfa041b8 | [
"Apache-2.0"
] | permissive | marineam/nagcat | 3ec96537bda196a026da5e771af8ebfcf25fd06e | 445d0efe1fb2ec93c31d1f9d8fa0c0563189ffaf | refs/heads/master | 2021-01-15T16:53:17.349372 | 2012-06-25T21:24:26 | 2012-06-25T21:24:26 | 1,930,777 | 7 | 3 | null | null | null | null | UTF-8 | Python | false | false | 6,157 | py | __init__.py | # snapy - a python snmp library
#
# Copyright (C) 2009 ITA Software, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be ... |
4ccc731739a3603fd4c645026a98a4f35178f018 | 8e532715d8bee01816b7422ae841f479586b10a6 | /stack_ex.py | c3d87cf74ae911d377bd6c2682a317d4206b4421 | [] | no_license | MeeSeongIm/stacks_and_queue | b9dc99c2f61bd0f0b1bcf15a7d401de2a218c117 | e6d76c40568bbd1146b4fb14b143703c447fe18b | refs/heads/master | 2020-05-03T01:54:49.583479 | 2014-10-30T04:23:05 | 2014-10-30T04:23:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | stack_ex.py |
# A stack (in the context of algorithms and computer science)
n = 10
stack = [] # last-in, first-out
for i in list(range(n)):
stack.append(i)
print(stack)
stack.extend(("break", "break"))
for i in list(range(n+1,2*n+1)):
stack.append(i)
print(stack)
for i in list(range(int(n/2))):
stack.pop() ... |
3da1fcb79c0d71d678959f3e9565a1fc0f172496 | 456147454545c01acfa4b2900952d4b9583f63d9 | /wave.py | d40d41a1c01d9a5b097280d66c2f5e80c5562861 | [] | no_license | jordij/muddy | efe1d0f4149d8c7de8efaa56b41d1a990f5171d4 | adef69171d25f7c5f15f6c16f5b785904b466562 | refs/heads/master | 2020-05-18T17:19:49.601241 | 2020-01-06T03:14:46 | 2020-01-06T03:14:46 | 184,551,205 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,701 | py | wave.py | import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
import scipy.io as sio
import seaborn as sns
import itertools
from constants import TIMEZONE, ADCP_DATES, EVENT_DATES, CALM_EVENT_DATES
from pandas.plotting import register_matplotlib_converters
from tools import station, encoder, plotter
... |
f1831522c7a3d4bfc8c8f2fbb8bc803b949b8822 | f5e084f29f6db6d13006bb047b404de5667b106a | /hexogon/Game.py | 1a8f2559c60e24caeea1c7b71c4de1922a9f3397 | [] | no_license | acridBeaver/hex_game | b9413e8ce6e3eac19743cc71856fddef2fc86f8a | 3ce4838696d124bf5fcb75a8362a932f388e30b2 | refs/heads/main | 2023-02-18T10:02:20.071913 | 2021-01-20T14:51:37 | 2021-01-20T14:51:37 | 330,387,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,272 | py | Game.py | from pathlib import Path
from hexogon.button import *
class Game:
def __init__(self, size):
pg.init()
pg.mixer.init()
self.screen = pg.display.set_mode((WIDTH, HEIGHT))
self.clock = pg.time.Clock()
self.size = size
self.set_tile_size()
self.state... |
940e61b53859d89eebd178735d90132009c1e62b | 459154e1c9d3f94db6b8c58e601f516fc4f4494d | /Cameras_Layers/vboxright/pplnumlimit.py | c6fac56fffdb2e080bab7b6cc0fa6f93d25e1545 | [] | no_license | Aumie/inoutDetect | 9144db387c46efb35c34b342baab93b267919f2e | bffe6a7539d46e11f7d22e005f49babfbbe03278 | refs/heads/master | 2022-12-17T23:28:10.198285 | 2020-09-14T04:52:22 | 2020-09-14T04:52:22 | 279,746,257 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,446 | py | pplnumlimit.py | from PyQt5 import QtCore
from PyQt5.QtWidgets import QSpinBox, QLabel
from MainLayers.dialog_box import information_box
from database.linenotify import lineAlert
from process import isCamsOpen
def set_spinBox(self):
self.spinBox = self.findChild(QSpinBox, 'spinBox')
self.spinBox.valueChanged.connect(self.spi... |
05ed7c5f0fe394c320a5d90bbb7b46712eef2f7b | 333c4a38a6cc5582be413b007a278883814e5426 | /networkviz/utilities/__init__.py | d428bd7e03069bfbbfd9d2059b75b872cffb1b46 | [] | no_license | srinibadri/VaderDemoFramework | 5bdfc0588f7260e53638ff84f43251fac8ffae24 | 9ea719660131dce1c46e3b31731f4a68d6c2c3b3 | refs/heads/master | 2020-06-14T07:07:54.330131 | 2016-11-30T22:33:12 | 2016-11-30T22:33:12 | 75,218,806 | 0 | 0 | null | 2016-11-30T19:18:00 | 2016-11-30T19:17:57 | null | UTF-8 | Python | false | false | 183 | py | __init__.py | from climate import *
from simulation import *
from database import *
from analyze import *
from helper import *
__all__ = ['climate', 'simulation', 'database', 'analyze', 'helper']
|
89aadfb10bdfd40cc7fa9c6f96e6eaeb8116137b | 71f73902d9558d0b9c98c93477b6d0dc3f16b67b | /examples/instantiate-via-constructor.py | 7dba88989d36cfc81c22e321154b4343e4f1f0fe | [
"MIT"
] | permissive | Elycin/pihole-stat-rainbow-hat | 2a83f27a350bfab950210a180620afbd2ced41e8 | 749b7b0ab5791d8567d9e8fb0bd7651df430c003 | refs/heads/master | 2020-04-23T22:59:43.833207 | 2019-02-21T12:11:02 | 2019-02-21T12:11:02 | 171,520,492 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | instantiate-via-constructor.py | import os
# change to the root directory of this project for an example.
os.chdir(os.path.basename(os.getcwd()))
# Import the main python script.
import pihole_stat_rainbow_hat
# We're going to define library as the script.
# Initialize the main class PiholeStatRainbowHat()
# Provide Parameters via the constructor
... |
558764558e8939fcb00c0e8a3f5c5c90c9f45d25 | 274921a52c5a155bc9f9023a8a031bb86d754257 | /course_shifts/models.py | 97c2a153b8cfba0a7e529086b548d4159ea811cb | [] | no_license | zimka/course_shifts | d958dcfed7f66a443ff13bc1ee34f90d683e91da | 5795675e0ba7c579a3dfeaf21b7d5a6aca64f9fa | refs/heads/master | 2021-01-21T11:33:44.061008 | 2017-12-04T15:58:27 | 2017-12-04T15:58:27 | 102,010,719 | 0 | 1 | null | 2018-02-28T11:17:11 | 2017-08-31T14:40:15 | Python | UTF-8 | Python | false | false | 17,940 | py | models.py | """
This file contains the logic for course shifts.
"""
from logging import getLogger
from datetime import timedelta
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.core.validators import MinValueValidator
from django.db import models, IntegrityError
from djan... |
1b317f1a1336643bf1d89f5546d953bda70137b5 | 5d163c4612913399d25de424e15f712811be8ce4 | /speech.py | 5a1065b5b17e0e1bf253572a59ebb933aaae148d | [] | no_license | kennethaamodt/MMM-GoogleSpeech | abaec2ca21287a52ed2253dcdd6b238615de714c | 272909e49bc4ad3194193fabf4cb12dac5dd44dc | refs/heads/master | 2020-03-10T09:50:36.799600 | 2018-04-12T23:20:48 | 2018-04-12T23:20:48 | 129,319,924 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,256 | py | speech.py | # speech.py
# speechrecognition, pyaudio, brew install portaudio
import sys
sys.path.append("./")
sys.path.append("/usr/local/lib/python2.7/site-packages/")
import speech_recognition as sr
import os
import requests
from gtts import gTTS
from pydub import AudioSegment
from pydub.playback import play
class Speech(obje... |
b08434ac473e0e7e89ef1448e0e9042fc4a6e5ef | 1aeb828e57be9b046ee25433fff05956f01db53b | /python_bms/방학IM대비/1130/당근수확.py | 1f2d59ca9828e68e04f98da9ef99c7d0f55edad9 | [] | no_license | LynnYeonjuLee/TIL_BMS2 | 11f2753e2e82c4898a782d6907a21e973c34cf69 | f363723391598caf5ec6b33925fcb8a13a252d9f | refs/heads/master | 2023-01-22T00:45:25.091512 | 2020-12-04T00:22:44 | 2020-12-04T00:22:44 | 290,238,836 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,401 | py | 당근수확.py | T = int(input())
for t in range(1, T+1):
N = int(input())
carrots = list(map(int,input().split()))
worker1 = 0
# worker2 = 0
standard = 0
sum_carrots = sum(carrots) # 총 당근 개수
# print(sum_carrots)
m_list1 = []
# m_list2 = []
while standard < N:
for i in range(standard):
... |
6aca43524920101e503e48f345b39d0bc7e1393e | f428a871cc7473e3686674216c601d7302d35d54 | /traveling_salesman_play.py | 084f93b1786aa0bc3f156ccd1d841dad9ef381a8 | [] | no_license | patwater/PA_GA_DS_Work | 45cfe4f38fa0f3e5fda2aac7d5d7599b01f14c9d | efb92269d1dcb3138c7ba3c46bea87a314835b2e | refs/heads/master | 2021-01-23T08:34:57.191190 | 2014-08-20T23:22:30 | 2014-08-20T23:22:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,192 | py | traveling_salesman_play.py | # random and nearest neighbor reqs
# sample.tsp -- 709 random, 669 nearest neighbor, 550 letter of rec
# https://github.com/ga-students/DS-LA-03/wiki/Lesson-02-Assignment-Traveling-Salesman-Problem
# Manhattan salesman
import sys, getopt
import random
import networkx as nx
import matplotlib.pyplot as plt
with open(sy... |
9e732804dd80a0b37c22725048998fedbd5caff7 | aeb69456c4e6f2238c947ae426d346aad033d598 | /python/剑指64 1+...+n.py | 3b9e4ff1be533f3ae086b1e5a3cbac08c7f411aa | [] | no_license | ElonXie/LeetCode-Practice | f2c345cadce8d60515343ee94f52de5f34477d81 | 7a54fc8f85e3e7f937bb504a8f4c6de6dd7da3e2 | refs/heads/master | 2021-05-16T21:09:11.231951 | 2020-06-21T03:39:12 | 2020-06-21T03:39:12 | 250,470,089 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 330 | py | 剑指64 1+...+n.py | class Solution:
def sumNums(self, n: int) -> int:
return n and n+self.sumNums(n-1)
# 2. 快速乘
class Solution:
def helper(self, A, B):
ans = B and self.helper(A << 1, B >> 1)
ans += B & 1 and A
return ans
def sumNums(self, n: int) -> int:
return self.helper(n, n + 1) ... |
39c92af4290777c24a3fdbfbb1fbd8c5331df1fd | 3d7d39fbfbf2d08a6ffda6466c37ec0bc92a0475 | /python basics/percentage.py | c64e03f8978cd9395597c804f875660bf315655a | [] | no_license | mufc2310/MachineLearning | 3fff0e67812cb90fc9158a821867ad827c88bb97 | 8f23fe2aa3d969a5903c36854952105d23ac5004 | refs/heads/master | 2020-03-30T15:23:10.644396 | 2018-10-06T06:54:27 | 2018-10-06T06:54:27 | 151,360,670 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 340 | py | percentage.py | #wap to percentage form user & print frist class if percentage is above 60, print second class if percentage is between 40 and 60, print KT is percentage is less than 40.
per=input("Enter the percentage :")
per=float(per)
if(per>=60):
print("First class")
elif(per<60 and per>=40):
print("Second class")
el... |
a2fdd6c25b7e68049c71199ce571071d67c4d28b | 04fcdf31ed973843ff131e1b876f0995f0a50dc6 | /map.py | 2ef180041754333039cf746dda47dac271a6dab1 | [
"MIT"
] | permissive | brandonrford/anthro_map | 1323bceafda9c8b5fe31747ba5751ab2886b5086 | d4fe818ae30aa059225f0e1cec55e83be8e8e59c | refs/heads/main | 2023-08-30T19:27:05.991243 | 2021-10-27T20:13:10 | 2021-10-27T20:13:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,060 | py | map.py | # -*- coding: utf-8 -*-
"""map.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1K2vyhIYiiX2RTCg3ZSk6_xe8_InPsOUt
"""
"""Google Colab Necessities
#installing the latest version of folium
!pip install git+https://github.com/python-visualization/foli... |
18a72eae99b2360de78659ed7937eb9369df8e9a | 55e433cba8134e4bc551dfc7e55e2246d56a075d | /founditapi/models/__init__.py | dc596b87ce4f21f939b8d29e8aa16076fc5b9614 | [] | no_license | sambirky21/found-it-public-api | 1653e57f726ab2f2e30d23d4c2076bf88ecc78b3 | aa7fe2cf3b3cd027a766b2b58c9e3af669f8b00c | refs/heads/master | 2022-05-02T09:51:24.900009 | 2019-11-04T19:22:13 | 2019-11-04T19:22:13 | 217,324,008 | 0 | 0 | null | 2022-04-22T22:39:45 | 2019-10-24T14:49:46 | Python | UTF-8 | Python | false | false | 125 | py | __init__.py | from .category import Category
from .item import Item
from .categoryitem import CategoryItem
from .organizer import Organizer |
6c685b84c7ce59f55835347d23b57fa32c3597c2 | 6538a9bdabafe0c0cae2bab797f03138677deb3a | /app.py | 358396bd2c17db7e8abb5c6200c55a9695bd6331 | [] | no_license | anshazad/lab6-q3 | deaabc1271cf131da3a124a74a4bfda163542ad1 | cd943c437a1f5a054b5d3331370ea81255de6924 | refs/heads/main | 2023-07-04T13:49:19.718303 | 2021-08-08T07:36:29 | 2021-08-08T07:36:29 | 393,892,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 620 | py | app.py | import json
from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
@app.route("/")
def home():
return render_template("InputOutput.html")
@app.route("/submitJSON", methods=["POST"])
def processJSON():
jsonStr = request.get_json()
jsonObj = json.loads(json... |
3a202eb93573410cfa4098072e9be0cfb5c508dd | 4856260c4d73cfcf9b19f18d43653b359e64ed6e | /lightexperiments/std.py | 407c791e56f474cc4d1f0f4c2fde83f7f9142404 | [] | no_license | mehdidc/lightexperiments | b91fa63c444ba14b462c8d470910bea2cf412d31 | ab43d83aa49ec908520145f616c0ebeeff2f08c4 | refs/heads/master | 2020-04-28T02:20:54.018504 | 2016-05-05T09:06:26 | 2016-05-05T09:06:26 | 174,894,992 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,162 | py | std.py | import sys
import os
from io import TextIOWrapper, BytesIO
import datetime as dt
def initials(e):
e = duration_start(e)
return e
def endings(e):
e = duration_end(e)
return e
datetime_format = "%Y-%m-%d %H:%M:%S"
def duration_start(e):
e["start"] = dt.datetime.now()
return e
def durat... |
f84f985a8879b2d1fe19f91362f5f7ba6127cfe7 | 50daf46d50f93c3e984a3cfca074f44deaf13035 | /026.py | 2d9d99ba09a3bd340dd09045889bd41867ea46ec | [] | no_license | lwxted/leetcode | 1e7965bbc4b98270abe3aac8b2d5eb0dd23a91cc | ee5d47629adb63d25042bc201b97994f09c52b42 | refs/heads/master | 2021-01-17T17:32:47.586907 | 2016-07-13T07:18:15 | 2016-07-13T07:18:15 | 56,295,039 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 341 | py | 026.py | class Solution(object):
def removeDuplicates(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
i, p = 0, None
while i < len(nums):
if p == nums[i]:
del nums[i]
continue
p = nums[i]
i += 1
return len(nums)
a = [1, 1, 1, 2, 3]
print Solution().removeD... |
504323def11c7a750a9f84dd2e951109409e8696 | 718731ede64337aad21bc0d99807f30197343f50 | /scripts/build/macosx_DeployApp.py | 4be32f7fdd0efd79a7c8c14dfae446838e08fd0e | [] | no_license | freqmod/FileSync | 334def2033b688739176c62802bed4d6f4a42ff6 | c0297d3d5ccdfd78c977d35639e9c06862fd25bd | refs/heads/master | 2021-01-01T20:15:44.393178 | 2011-10-17T22:16:49 | 2011-10-17T22:16:49 | 2,586,136 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,562 | py | macosx_DeployApp.py | #!/usr/bin/python
# -*- coding: iso-8859-1 -*-
################################################################################
# #
# 2008 June 27th by Marcus 'EgS' Eggenberger <egs@quassel-irc.org> #
# ... |
f75234a8b785ba68957a473fa503a17eb1c60b3a | 16df80d429e43ae681af5aa9e0bf5b1c09996045 | /g_layout.py | fec541b5900f2e7fb6df147c5eb98251715dbb67 | [] | no_license | trueomarson/calcus.py | 1e571aa0a98b8b9b165bc2f0f9d87c2ef71e716b | 9e837688ee3d48880c7da659f952a084e4e64251 | refs/heads/main | 2023-07-24T01:57:13.746816 | 2021-09-09T16:30:44 | 2021-09-09T16:30:44 | 404,794,089 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 804 | py | g_layout.py | """Grid layout example."""
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWidgets import QGridLayout
from PyQt5.QtWidgets import QPushButton
from PyQt5.QtWidgets import QWidget
app = QApplication(sys.argv)
window = QWidget()
window.setWindowTitle('QGridLayout')
layout = QGridLayout()
layout.addWi... |
7fd2f31f4918d7f1569c8d3cfcfe91f9e801b310 | 0566cf76b456518875edecece15e763a36a4795f | /scrapers/yify_info.py | e4c8ceef281e3d3adf9e9ffb723a4686f3a5d099 | [] | no_license | theclonedude/Scraping_BeautifulSoup_phantomjs | 684b1f7a993e0d2555daa7a5455cf19bd29b0b1b | faf653feae46c21a72d13b2123cdebdb2f7c05d8 | refs/heads/master | 2023-03-16T19:36:14.867361 | 2018-06-14T14:21:02 | 2018-06-14T14:21:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,567 | py | yify_info.py | # -*- coding: utf-8 -*-
from sandcrawler.scraper import ScraperBase, SimpleScraperBase, OpenSearchMixin
class Yify_info(OpenSearchMixin, SimpleScraperBase):
BASE_URL = 'http://yify.info'
OTHER_URLS = []
def setup(self):
self.register_scraper_type(ScraperBase.SCRAPER_TYPE_OSP)
self.search_... |
5e4b817ba2862ded61cd5aea3ddae9830277f3d7 | 91e20e58ddd457f51d1b0750442e337175872aa4 | /setup.py | 68510048c6d66bba13d3dfdde700a14bfe00f12c | [
"MIT"
] | permissive | konradstrack/stochastic-sudoku-solver | 805c5862949ec4d174b060215342dc239f946f81 | f2e65a4947045c1c5462793ac6bb3fa210011c8e | refs/heads/master | 2021-01-19T22:10:55.511974 | 2014-06-23T09:43:47 | 2014-06-23T09:43:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 302 | py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='Stochastic Sudoku Solver',
version='0.1-SNAPSHOT',
description='',
author='Konrad Strack',
url='https://github.com/konradstrack/stochastic-sudoku-solver',
packages=['solver'],
requires=['numpy'],
) |
368ae422215f89e7ff203d71b8f30f53bb0a5f7f | f524f1292610c7f0d79f0c2c9b232e7a6a0eb1a0 | /setup.py | 1604849bc7837e7f14d6acadb3261ad961288350 | [
"MIT"
] | permissive | pythomec/scurvysin | d66a3a02d4ca1b0135b6b685138d1e9a34145af9 | d9f0b402cc6b2748788a792131aec8054b1cb64d | refs/heads/master | 2022-01-21T07:33:04.226894 | 2022-01-07T08:10:25 | 2022-01-07T08:10:25 | 186,145,148 | 0 | 0 | MIT | 2022-01-07T08:10:26 | 2019-05-11T14:47:38 | Python | UTF-8 | Python | false | false | 690 | py | setup.py | from setuptools import setup, find_packages
from scurvysin import __doc__, __version__
options = dict(
name='scurvysin',
version=__version__,
packages=find_packages(),
license='MIT',
description='Pip & conda wrapper / warper.',
long_description=__doc__.strip(),
author='Jan Pipek, Pavel Ca... |
5d36957a14dbbcca06cd62328acf0a82ce98e0c7 | 31c7d15baebdeed19156475779e2c30516652bb2 | /tests/create_basic.py | be428aefbb8933a7ee97002f9645e8a8bcd9414d | [
"MIT"
] | permissive | fabien-roy/cardbot | e640670aaea984a2b7d49a5ad0803aa305cec7f4 | 1e0fa1e9c08b512056c2af0b408eded224c9adbb | refs/heads/master | 2023-04-07T20:56:27.645198 | 2020-05-15T17:28:54 | 2020-05-15T17:28:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 81 | py | create_basic.py | from random import choice
def random_enum(enum):
return choice(list(enum))
|
eb5e2c3bcac904f1bfbc7b2f9cca890097c3f30f | 769aa72935d85169d25e453d52413f40228bfdc1 | /C11_Multi-dimensional_Searchlights.py | cdd1c92819f154b1448e25aca4536069b7437f1e | [] | no_license | santosg57/haxby | 3c80a7f24e1fed4891e01baa2cb48f8e4ca69c33 | 9ca6fdbb6efa5510cd6d52f247213db533fdd41f | refs/heads/master | 2021-07-09T03:52:35.503717 | 2017-10-10T16:30:53 | 2017-10-10T16:30:53 | 100,623,376 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,334 | py | C11_Multi-dimensional_Searchlights.py | # Multi-dimensional Searchlights
from mvpa2.tutorial_suite import *
data_path = '/home/inb/santosg/TUTO/tutorial_data/data/'
ds = get_raw_haxby2001_data(data_path, roi=(36,38,39,40))
poly_detrend(ds, polyord=1, chunks_attr='chunks')
zscore(ds, chunks_attr='chunks', param_est=('targets', 'rest'))
events = find_event... |
5a8f5c889e23cc44329d5b33e38bb4a0751837cf | bf6046621c912130770377829227223ec07f973a | /controller/appcontroller.py | ce8944f950447a85d75347f0bb9de4fd39f39ac0 | [
"MIT"
] | permissive | siralmat/assignment-trekapp | b883d94182a3a495caab332692f7066013eaadc5 | 522186e1dfceb0253ad18d8cf82b5c9ddc0ee7bb | refs/heads/master | 2020-03-21T22:39:31.976896 | 2018-08-05T13:08:06 | 2018-08-05T13:08:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,669 | py | appcontroller.py | """
Module: appcontroller
Author: siralmat
"""
from controller.trackingcontroller import TrackingController
from model.tracker import Tracker
class AppController:
"""
A controller for a view communicating with a route collection.
Provides functionality to manipulate the collection.
"""
def __init__... |
f3891231131e215ac9bed5196b5e3cef788469b3 | bf67f868a009143906df47bf4593ffec9a67291d | /Fcsv_a_lista2.py | d786a3396ce74bf685892baeb63dc2b508fd5e68 | [] | no_license | Ruben1819/RP-N3 | 28a2f72e0ba20c472d94fb3a0b0e94e17705e16b | 65f950502bf8de4b3969ce07c90a49a79ca0f466 | refs/heads/main | 2023-04-22T08:08:43.633910 | 2021-05-12T00:25:00 | 2021-05-12T00:25:00 | 366,546,234 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,366 | py | Fcsv_a_lista2.py | # Módulo para trabajar con CSV
import csv
# Clase de trabajo
class Contacto:
def __init__(self,USUARIO, NOMBRE, CORREO):
self.USUARIO = USUARIO
self.NOMBRE = NOMBRE
self.CORREO = CORREO
def getNombre(self):
return self.NOMBRE
def __del__(self):
print... |
fa05bb32c7749acfcf3983119c3b437cc24f2e79 | aec3cb058bc5b50a09b39808fff10a3858104777 | /broadcasts/views.py | fc8f3e38645fa3c593bffdd4874fc0fdb4f66e9a | [] | no_license | igoo-Y/Busker | 37076cb3d97d253525374238c45ed0bc34d95b1e | 33433392b77d392d562c833ab0263e0b6dc87d8f | refs/heads/main | 2023-06-05T10:21:33.594770 | 2021-06-29T16:31:30 | 2021-06-29T16:31:30 | 380,946,007 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | views.py | from django.shortcuts import render
from .models import Broadcast
def broadcasts_list(request):
return render(request, "broadcasts/broadcasts_list.html")
def broadcast(request):
context = {}
return render(request, "broadcasts/main.html", context=context)
|
df7e9ae1b28722698ec8309a66238473be37a066 | d411d2f8dda617bf38436e3bedff2015f0d12e07 | /src/wezel/canvas/scene_filter.py | 8d23919a2a0a5046dc5bc15e901ae356c302cd81 | [
"Apache-2.0"
] | permissive | QIB-Sheffield/wezel | 03dcbd037e5e44cda4ff0037a4d93fd2eb44371e | abd48f4e51b83361aaca8a66568b88510f0e5e82 | refs/heads/main | 2023-07-06T03:33:41.843434 | 2023-06-12T14:22:23 | 2023-06-12T14:22:23 | 499,943,082 | 0 | 6 | Apache-2.0 | 2023-07-04T13:26:20 | 2022-06-04T21:45:45 | Python | UTF-8 | Python | false | false | 2,718 | py | scene_filter.py | from PySide2.QtCore import Qt, QRectF
from PySide2.QtWidgets import QGraphicsObject, QGraphicsItem, QAction, QMenu, QPushButton
from PySide2.QtGui import QPixmap, QCursor, QIcon, QColor, QPen, QTransform
from wezel import canvas, icons
class PanFilter(canvas.FilterItem):
"""Panning the scene
"""
def __ini... |
3fe70b8e3b6abadb74e08d8e7f4c990c94aaa95a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03104/s538649821.py | 33993244423cafae1a35e64cf1236826ca8af1af | [] | 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 | 269 | py | s538649821.py | A,B = map(int,(input().split()))
def xor(n):
if n%2 == 1:
if (n+1)%4 == 0:
return 0
else:
return 1
else:
if n%4 == 0:
return n^0
else:
return n^1
print(xor(A-1)^xor(B)) |
79104dd5e10c3d633e2c6eb3b91758168feb10c7 | c0e733cb509eb7e296969be925849d6d014e4058 | /algos/neural_nets.py | 6a6b706c9c538327cd619584a7ba4d9fa82682e2 | [
"Apache-2.0"
] | permissive | feloundou/safe-experts | 735acd755f873a03287a8fd1cb4b60ba3abaa546 | 9592bd48ce7eed721a36cb688dd10dc7f527a13b | refs/heads/main | 2023-03-21T19:08:03.118799 | 2021-02-17T02:32:51 | 2021-02-17T02:32:51 | 339,589,632 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,678 | py | neural_nets.py | import numpy as np
import scipy.signal
from gym.spaces import Box, Discrete
from torch.nn import Parameter
import torch.nn.functional as F
import torch
import torch.nn as nn
from torch.distributions.normal import Normal
from torch.distributions.categorical import Categorical
from utils import *
def mlp(sizes, act... |
1cb9ac752db254bdf940f96ed2b2f22803fd12f4 | cb3dac9ec1845b15193bf152dc33796f71e9f0a3 | /part1/mergesort.py | a1a24c5b72a6517b511de2cf5b644041c027592a | [] | no_license | hvu53/python600x | 8454917f14730588137b2003af15e0e07b8183e9 | 64ce60555ac835868811ec081a790ad7c03a7628 | refs/heads/master | 2021-01-10T02:00:21.265308 | 2013-06-07T22:03:08 | 2013-06-07T22:03:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 691 | py | mergesort.py | def mergeSort(L, compare = operator.lt):
if len(L) < 2:
return L[:]
else:
middle = int(len(L) /2)
left = mergeSort(L[:middle],compare)
right = mergeSort(L[middle:], compare)
return merge(left,right,compare)
def merge(left, right, compare):
result = []
i, j = 0,0... |
f5e4c91c2df8e9c011cdeaee755873be016fbce2 | 3f89d043476e13e7d83c56d1f88879936e3ab020 | /algos/pane/main.py | aa0aef5dc8addf94eaaba40d32b5611572b7dd2a | [] | no_license | 00mjk/PANE | cb09fc184a6f0513bc95da9ea6234da17289113f | 07eea83d1d52ca11bbcf505e1c33394b5d8b90df | refs/heads/main | 2023-09-05T22:28:19.011496 | 2021-11-09T06:23:26 | 2021-11-09T06:23:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,009 | py | main.py | #########################################################################
# File Name: run.py
# Author: anryyang
# mail: anryyang@gmail.com
# Created Time: Mon 08 Apr 2019 10:09:10 AM
#########################################################################
#!/usr/bin/env/ python
import time
import datetime
import argp... |
ef8f7a269765116171e874d865a172e39eb0e082 | 88ad672d1df558d4b99689a3ddb5882c6ad08753 | /backtraking-concepts/n-queens.py | accd528f4ce16a84a8a6643d4e3dd9a162fdb8b7 | [
"MIT"
] | permissive | Cubillosxy/playwords | 73adb0e92d4e2d6e036eb67f7076897dab040df9 | e2817e71face065ceda3cac2d0e2fe1880e4d953 | refs/heads/master | 2022-11-09T18:02:58.740568 | 2022-10-24T14:20:29 | 2022-10-24T14:20:29 | 80,666,209 | 0 | 1 | MIT | 2022-10-24T14:20:30 | 2017-02-01T21:29:30 | Python | UTF-8 | Python | false | false | 778 | py | n-queens.py |
def check_attack(queens_candidate):
queens_size = len(queens_candidate)
queen_candidate = queens_candidate[-1]
candidate_index = queens_size - 1
if queens_size <= 1:
return True
for i in range(0, candidate_index):
if abs(i - candidate_index) == abs(queens_candidate[i] - queen_cand... |
372727511d032056a4ce96ea7f156f3f6c29be20 | 0d8bb6042f70b7a85ea45fc5cbbf6656ca28a9ba | /MOD04/main.py | 7036de4144f2f31bbc483a12d0f8cb1a1c83c7d3 | [] | no_license | luizpopoff/bootcamp_eng_dados | ea945d75b0a0243aad5307888f9fc9c66577a6c8 | 9de2dd739250baa048f24e82eb0c08c8772ba1ce | refs/heads/main | 2023-06-07T14:18:45.320624 | 2021-07-06T19:35:14 | 2021-07-06T19:35:14 | 383,289,150 | 0 | 0 | null | 2021-07-06T19:35:15 | 2021-07-05T23:47:17 | Python | UTF-8 | Python | false | false | 495 | py | main.py | from sqlalchemy import create_engine
import pandas as pd
engine = create_engine('postgresql+psycopg2://root:root@localhost/test_db')
sql = '''
select * from vw_artist;
'''
df_artist = pd.read_sql_query(sql,engine)
df_engine = pd.read_sql_query('select * from vw_song;', engine)
sql = '''
insert into tb_artist (
SELE... |
b39dc4dacebc0906e7c900bbdef73e3c0be105cd | 6ba53cbb07b2fbe5495f38d0127bfa7c18833010 | /setup.py | 8979765efaf5bb717e5ee000c0f2d3eb280f78c2 | [] | no_license | dianalyx/welib | 85277dce94cdab867c369fcc0e8264b0021521f0 | bb73605bc8f88875b1323492d8b5a07f56d6def0 | refs/heads/master | 2020-04-28T22:49:10.336100 | 2019-03-01T20:31:29 | 2019-03-01T20:31:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 306 | py | setup.py | from setuptools import setup
setup(
name='welib',
version='1.0',
description='Python library from E. Branlard',
url='http://github.com/ebranlard/welib/',
author='Emmanuel Branlard',
author_email='lastname@gmail.com',
license='MIT',
packages=['welib'],
zip_safe=False
)
|
96b02ae534f03482da11fb1f6586aa2c1f406fdd | 02dae33232bc22980784c4bf88af44c4a2864a0e | /otter_test/hidden-tests/q1H.py | 06396a0d893d042df7cc71050b3f08f6f13a7203 | [
"Apache-2.0"
] | permissive | nnbaokhang/ok-client | 1e057c2d3a1a1ca4c0f07b0c6c6dc4a1a3431a4f | 37c507273301ff6292ce7851a5e4d6f76c5cdb5c | refs/heads/master | 2023-02-05T05:45:49.914353 | 2023-02-03T18:45:28 | 2023-02-03T18:45:28 | 252,330,273 | 0 | 0 | Apache-2.0 | 2020-04-02T01:55:11 | 2020-04-02T01:55:11 | null | UTF-8 | Python | false | false | 305 | py | q1H.py | test = {
"name": "q1H",
"points": 2,
"hidden": True,
"suites": [
{
"cases": [
{
"code": r"""
>>> square (2.5) == 6.25
True
""",
"hidden": False,
"locked": False,
},
],
"scored": False,
"setup": "",
"teardown": "",
"type": "doctest"
}
]
} |
ae3dd2a9b75c59dc192b19979c5b7bc6956c8908 | 32095e32c55917d686a3765c773d2f64f110907b | /tests/test_main.py | e9d7ac2518510e9c0e1c88499272d3e18b9e4382 | [] | no_license | Jaza/fictionary | 9faf8c72fd953da8937924ac51ccedc249c05240 | 0f7121f9ba249ab984f8ed5e504ae8314c2f395b | refs/heads/master | 2020-03-25T01:12:23.693694 | 2016-01-07T14:08:26 | 2016-01-07T14:08:26 | 143,226,261 | 0 | 0 | null | 2018-08-02T01:29:55 | 2018-08-02T01:29:54 | null | UTF-8 | Python | false | false | 1,329 | py | test_main.py | import logging
import mock
import pytest
import fictionary
def test_no_args():
with mock.patch('fictionary.DataFile', autospec=True) as df:
fictionary.main([])
assert df.called
args, kwargs = df.call_args
assert kwargs['refresh'] is False
def test_no_args():
with mock.patch(... |
6a20e205aa31aa18c27a5da193be45b65a607419 | 79fcffd1d0e6cfc1ad92d0663090d0655dc00e92 | /pybo/views/question_views.py | 961fae1289d50807e4ad0a197ca44a9c8f449813 | [] | no_license | defyattack/pybo | cb86e196baad294385bb2f696b9db741669bb38e | 136e6f7421f6cfa1b93ebd31c9e9327f72f2d425 | refs/heads/master | 2022-12-01T00:50:15.284302 | 2020-08-18T04:32:15 | 2020-08-18T04:32:15 | 287,217,438 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,382 | py | question_views.py | from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, get_object_or_404, redirect, resolve_url
from django.utils import timezone
from ..forms import QuestionForm
from ..models import Question,Category
@login_required(login_url='common:login'... |
a96a0f21f23487b39a5fa05829069152ec7095b0 | 1feb96fa49214153e9c844a07ebd9fe88d712861 | /l684.py | f7eeba80ba0c4a35dc50a5e981505faa900c567f | [] | no_license | minging234/LeetCode_ming | f9eae748ea8e3eb01916f8aa61f76f62ef25d36f | 8790abadd5289024794cd95529187c96111c2bd6 | refs/heads/master | 2021-09-19T05:21:04.778665 | 2018-07-23T20:48:32 | 2018-07-23T20:48:32 | 108,206,365 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,816 | py | l684.py | """ Redundant Connection """
import collections
class DSU(object):
def __init__(self):
self.par = range(1001)
self.rnk = [0] * 1001
def find(self, x):
if self.par[x] != x:
self.par[x] = self.find(self.par[x])
return self.par[x]
def union(self, x, y):
xr... |
97c457ab22bffd9d4a2cef1b289398336f5ba746 | 6fbddbc3fdb05f93ef27a252b2b6b553acb6079b | /pyutilib/component/core/__init__.py | 16a166a9dfbc4d6e6a932fce6d83483360f8d23c | [
"BSD-3-Clause"
] | permissive | whart222/pyutilib | 4b7f888ff3de51c3d012048d2f36227db36e6a71 | d99406f2af1fb62268c34453a2fbe6bd4a7348f0 | refs/heads/master | 2021-03-27T00:11:31.403933 | 2020-08-11T19:34:22 | 2020-08-11T19:34:22 | 247,765,065 | 0 | 0 | NOASSERTION | 2020-03-16T16:32:25 | 2020-03-16T16:32:24 | null | UTF-8 | Python | false | false | 1,667 | py | __init__.py | # _________________________________________________________________________
#
# PyUtilib: A Python utility library.
# Copyright (c) 2008 Sandia Corporation.
# This software is distributed under the BSD License.
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains ... |
a3f3c142b8c3003c3262fa947915c992b390304b | 7aa0e2b49ed5c05fe88b33393ee78ce3907a74d5 | /src/actions/actions.py | 3c5dfd238435e708fa8380c06255ffa2a8fcbff3 | [] | no_license | dazzbourgh/greenhouse | 467c5422651ec7b436cbb5e34dc00dc13b1ed218 | d702e4ee1811794eb2077ffb1e4386de54abdefc | refs/heads/master | 2023-03-24T20:11:04.334000 | 2020-10-26T05:47:17 | 2020-10-26T05:47:17 | 267,777,897 | 0 | 0 | null | 2021-03-25T23:47:09 | 2020-05-29T06:01:38 | Python | UTF-8 | Python | false | false | 1,119 | py | actions.py | from actions import MEASURE_TEMPERATURE, SET_TEMPERATURE, SET_LIGHTING, SET_HUMIDITY, SET_CO2, MEASURE_HUMIDITY, \
MEASURE_CO2, FLIP_SCENARIO
from redux.store import Action
def measure_temperature():
return Action(MEASURE_TEMPERATURE)
def measure_humidity():
return Action(MEASURE_HUMIDITY)
def measure... |
935d92ab96b25d106a1b5a3293ab7fdcd1b841b8 | cd16b2a837958f14736a09881d7f4a053b5d1973 | /Notebooks/Assignment 2/mesa_axelrod/.ipynb_checkpoints/agent-checkpoint.py | b5d2ae584bd4bf5aa451813fa3dcc101c4b0ac0d | [
"MIT"
] | permissive | JRMfer/ABM_individual | c8dcb9a954208a8383b5266714b71d0d37b35a82 | e1ec9dd5301d69a61e40ac0c1d9bee694433780f | refs/heads/master | 2020-12-06T22:35:25.908797 | 2020-01-24T16:11:27 | 2020-01-24T16:11:27 | 232,570,419 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,982 | py | agent-checkpoint.py | import axelrod as axl
from mesa import Agent
import random
class Player(Agent):
"""
A Player (agent), that walk around the grid. When meeting another agent it plays the iterative prisonners
dilemma, and the winner reproduces, the loser dies!
"""
def __init__(self, unique_id, model, pos, strategy):... |
b28f642251cfe52ea74b935db9af6416043cb40c | 3cda2dc11e1b7b96641f61a77b3afde4b93ac43f | /docs/extension/codesnippetcard.py | d1c067c384166497383d004798fd219aabf9b855 | [
"MIT"
] | permissive | Eurus-Holmes/nni | 6da51c352e721f0241c7fd26fa70a8d7c99ef537 | b84d25bec15ece54bf1703b1acb15d9f8919f656 | refs/heads/master | 2023-08-23T10:45:54.879054 | 2023-08-07T02:39:54 | 2023-08-07T02:39:54 | 163,079,164 | 3 | 2 | MIT | 2023-08-07T12:35:54 | 2018-12-25T12:04:16 | Python | UTF-8 | Python | false | false | 3,111 | py | codesnippetcard.py | """
Code snippet card, used in index page.
"""
from docutils.parsers.rst import Directive, directives
from docutils.statemachine import StringList
from docutils import nodes
from sphinx.addnodes import pending_xref
CARD_TEMPLATE_HEADER = """
.. raw:: html
<div class="codesnippet-card admonition">
<div cla... |
47a1f23995918b5799bc084559ee21c5c470f0e8 | 0c8fa6f4efa6dce9af23f43d04857789902f8e12 | /app/__init__.py | 1cc17c57dd8d1d99b2e113919dff72af283e56ad | [] | no_license | vinodreddyg/intent-app | d332ca02d4a74fcf79873458e1d6b3487c4a6eec | aca785f8d4c93e55655f9d69b59fe0024a8b8be6 | refs/heads/master | 2020-04-06T09:54:20.298615 | 2018-11-19T21:18:01 | 2018-11-19T21:18:01 | 157,361,286 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 565 | py | __init__.py | from flask import Flask, g
from .rasanlu.rasa_model import RasaModel
from flask_pymongo import PyMongo
from .deeppavlov import DPModel, Proba2Dict
app = Flask(__name__)
app.config.from_object('config')
mongo = PyMongo(app)
from app.rasanlu.routes import mod
app.register_blueprint(rasanlu.routes.mod, url_prefix='/rasa... |
ff68917e94ddf6939b8371623f48010577f5adb1 | 47685ffc34c6c7fa4a36cfc90d1e5753b1afca57 | /Permutations.py | 94f4fc9d2c6832e6112f2fe59603e8e8fc29837a | [] | no_license | mikochou/leetcode_record | 15a97ed710699bd1431a7bb1f6a1ac745d096bb9 | f0e2ab7d6a8ed4ffb41143e5592822e56bbb90e6 | refs/heads/master | 2020-07-03T03:09:10.812024 | 2020-02-12T03:02:14 | 2020-02-12T03:02:14 | 201,765,499 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 322 | py | Permutations.py | #递归的方法。
def dfs(self,nums,res,path):
if not nums:
res.append(path)
else:
for i in xrange(len(nums)):
self.dfs(nums[:i]+nums[i+1:],res,path+[nums[i]])
def permute(self, nums):
res = []
self.dfs(nums,res,[])
return res
|
1160276eb756be9f43cd8de534e400ce1fd205d6 | d8dfa7aeaa490abe0f1bb0ca8d0b139db2e8b615 | /Yelp reviews.py | 4113cb904e42d59ca51b76f3265e8591f5499fec | [] | no_license | pri09/Case-Study-Ecommerce-Text-Mining-Classification | c735855cf5226676a7e8d6062bdf6b6f245e2ff4 | c277b0ce5c625171c7e1f9f177f0a38c9df484a8 | refs/heads/main | 2023-03-06T20:30:35.505309 | 2021-02-21T13:59:23 | 2021-02-21T13:59:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,466 | py | Yelp reviews.py | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
yelp = pd.read_csv('C:/Users/hp/Desktop/yelp.csv')
yelp.head()
yelp.info()
yelp['Text Length'] = yelp['text'].apply(len)
yelp.corr()
import string
from nltk.corpus import stopwords
def text_preprocess(st):
no_pu... |
5aa72ffb17b4d37e5b7cbe13de3964c71e43ecbf | 45272da6d64161a586b1dd41df63b8f701f38e39 | /Easy Problems/151-160/157easy.py | 79947eee5b0ecae6f7bcd526e6f115ff687087d9 | [] | no_license | Lucas-Guimaraes/Reddit-Daily-Programmer | 559f813d2ee1a06e80a2b260bcb43718ae50b8bf | 45d554d0e0f8bc67e2111bede3a45f77f5512d7b | refs/heads/main | 2023-07-31T18:36:48.774791 | 2021-09-13T04:08:09 | 2021-09-13T04:08:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,655 | py | 157easy.py | # https://www.reddit.com/r/dailyprogrammer/comments/22fgs1/472014_challenge_157_easy_the_winning_move_xgames/
# combinations = [[1, 2, 3], [1, 4, 7], [1, 5, 9], [2, 5, 8], [3, 5, 7], [3, 6, 9], [4, 5, 6], [7, 8, 9]]
def tic_tac_solver(player, string):
#start code, including winning combos
string = string.... |
5ad8bcfb57cb34246626b54066159abde6c53433 | fffa5f1fe7e1d2bd875f302fefa2295563773440 | /posts/views.py | 8c0345665e09c3c994ab2ef314ff98be06225e78 | [] | no_license | Awalamoo7/blogs-api | 9d2fe2d37837366863e8ffbab4372aa927e49875 | fd8112d666b10d728a3f12cfc284d7379eeedf41 | refs/heads/main | 2023-08-28T13:06:45.637222 | 2021-10-24T01:20:02 | 2021-10-24T01:20:02 | 420,555,567 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 553 | py | views.py | from rest_framework.viewsets import ModelViewSet
from .models import Post, Comment
from .serializers import PostSerializer, CommentSerializer
class PostViewSet(ModelViewSet):
serializer_class = PostSerializer
queryset = Post.objects.all()
class CommentViewSet(ModelViewSet):
serializer_class = CommentSer... |
a47a7e5c87b6599ca808add1319f4c616b811fb7 | 14421a12c4e80395567e676394d369fd9619bd32 | /Scripts/PythonMidLvl/7.py | 3d73ec9caf631de5cbfc5751e29c4016e92f39e4 | [] | no_license | jawor92/Python-Udemy-Mobilo | 7b331e8197233c3116e43e0b3c1110b9b878762e | 8098508835121a1536c2753bc4eedbf17163c93d | refs/heads/master | 2020-12-09T21:39:09.366604 | 2020-01-12T19:31:09 | 2020-01-12T19:31:09 | 233,423,486 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 243 | py | 7.py | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 4 22:02:56 2019
@author: Mateusz.Jaworski
"""
days = ['mon','tue','wed','thu','fri','sat','sun']
workday=days.copy()
print(workday)
workday.remove('sun')
workday.remove('sat')
print(workday) |
593401113a3768a1300924b7081dd9567218b703 | e42813df822ed40d4f4d3004732da7c448cd0083 | /keyfeatures.py | 2fb1609894d9e052d4e69d61df3e6e43735f6934 | [] | no_license | JaredZena/Stereocamera_python_opencv | 1470e8d4662dbec8d7ac710920ca489368d3961f | cb6a8116ecba710778ac106bd25f0bb994985815 | refs/heads/master | 2020-04-29T03:52:50.366592 | 2019-08-11T00:45:50 | 2019-08-11T00:45:50 | 175,826,924 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 983 | py | keyfeatures.py | import numpy as np
import cv2
from matplotlib import pyplot as plt
img1 = cv2.imread('C:/Users/Jared/Documents/python_scripts/test1_segmented_images_left/rectified_left_20.png')
img2 = cv2.imread('C:/Users/Jared/Documents/python_scripts/test1_segmented_images_right/rectified_right_20.png')
gray1 = cv2.cvtColor(img1, c... |
655f5bf8f6aa7e4fe9fce7db1362c50c9d3b5aca | da437d59c9caf5d10e8c7be0e640a6c08507d2f4 | /model/mil_model.py | 1b05fcae85c2adb2d136732f8fb232c341aef6c5 | [] | no_license | SoliareofAstora/vision_pipeline | 9982ea7b3d2fe009102d0e712535be9bba362a1c | f7a2d76a155c8b3d863b10e7f9e1a148f98c3780 | refs/heads/main | 2023-05-08T23:36:19.403137 | 2021-06-01T14:12:31 | 2021-06-01T14:12:31 | 372,847,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 78 | py | mil_model.py | import torch
class MilModel(torch.nn.Module):
raise NotImplementedError
|
b52f0ea549bea7716060f4e15081372428636ca2 | 305a129813decd37b844c07055ab5dcf7d56b5ce | /python/parse_hadoop_config.py | 71429c4b829d5dee4fd83e1c1fef529a3a0fe344 | [] | no_license | cokecode/common | 49d549be25a26b20bddeff28d64a592150d614f0 | b800a86f8d409f5cacdfd3895dbdd1506a29b9cb | refs/heads/master | 2021-12-01T15:48:42.191444 | 2021-11-17T15:08:38 | 2021-11-17T15:08:38 | 8,904,299 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,755 | py | parse_hadoop_config.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# vim:smartindent:expandtab:smarttab:shiftwidth=4:tabstop=4
#
import sys
import libxml2
import json
def parse_property(element):
child = element.children
d = {}
while child is not None:
if child.type == "element":
name = child.name.strip()
... |
9b202adf2ba6cf9501b40532bb94313481178d50 | 55ac8cbf18afada308c5d29db936f6a71ab1cb4b | /room.py | 8edc35057683044aab5ffd35fb0ab0ac1363f1e4 | [] | no_license | bbriano/twinder | 47ca5ab867b02e7dc5a56411c4a0c2b4bb791cb0 | fed36c84c2b1bff36b6ad0384b919a8c1e570f27 | refs/heads/master | 2023-06-12T20:37:12.907070 | 2021-07-06T04:42:46 | 2021-07-06T04:42:46 | 383,341,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,595 | py | room.py | import time
class Room:
def __init__(self, roomname, users):
self.roomname = roomname
self.users = users
self.messages = []
self.created_at = time.time() # unix timestamp (seconds since 1970)
def profile(self):
""" returns profile of room same format as user profile
... |
2401c4e5c33a9d6cfa35c6370ccf50da5380a312 | 93c7eebb83b88cd4bfb06b6e5695ad785c84f1d6 | /tazebao/newsletter/migrations/0020_auto_20160928_1001.py | cf886b07e262dfa7d5c8af9aa0675b0fa6bd2c41 | [] | no_license | otto-torino/tazebao | 960e31a576f4acc7cd4572e589424f54a8e9b166 | 12db8605b5aa9c8bf4f735a03af90d0989018105 | refs/heads/master | 2023-08-09T02:06:14.749976 | 2023-07-28T07:20:23 | 2023-07-28T07:20:23 | 68,196,585 | 5 | 0 | null | 2022-12-08T05:25:04 | 2016-09-14T10:21:21 | HTML | UTF-8 | Python | false | false | 4,519 | py | 0020_auto_20160928_1001.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-28 08:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('newsletter', '0019_tracking_notes'),
]
operations = [
migrations.RemoveFiel... |
a0fd8a37e5295a2a3bbf73d440d3ed8d2d0fa8eb | 6c60d05d92a1b9d3a763688f8e15bf5cbc88d6fb | /setup.py | 19bb0bbf7a259342d88b93f9598a4771d7d220d6 | [
"CC0-1.0"
] | permissive | Elemecca/heraldbot | 2ad77fb055ff7ed7efe4afc73dbf2fe0f2662343 | 681ba6e1aee99eba24ea5ec0ff2c58c14297d89c | refs/heads/master | 2021-04-09T16:20:22.100203 | 2019-05-03T20:42:45 | 2019-05-03T20:42:45 | 125,658,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,191 | py | setup.py | # HeraldBot - polling notification bot for Discord
# Written in 2018 by Sam Hanes <sam@maltera.com>
#
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
... |
9b0f33a538808cf93fcaa1c315c63071f9d2d952 | f81681a80c2c28e888fb52a33472cfeef97516ab | /2020/d08b.py | 5bb3f1c7197580320f6c683c72748eb669f233a5 | [] | no_license | ajsaraujo/aoc | 5b4689eec8dd6607e4fedc91b5995639a57c37f5 | 0da152706fc4113e56b804f2254afb007062c9ad | refs/heads/master | 2023-01-24T14:35:21.782417 | 2020-12-11T18:53:28 | 2020-12-11T18:53:28 | 317,832,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,685 | py | d08b.py | import sys
def parse_instructions(file_content):
instructions = []
for line in file_content:
instruction_code, instruction_value = line.split(' ')
signal = -1
if instruction_value[0] == '+':
signal = 1
instruction = {
'code': instruction_code,
'value': int(instruction_value[1:]) * signal
}
... |
9c0e7748a29d0144ce1d6ad9ba09df49533a0437 | 0e15b94b11e5d2480b404247df04108fd81ca6cf | /python/dazl/rules/expr_util.py | c5c10705ba0f239984bb0e21b33c40258671f63f | [
"Apache-2.0"
] | permissive | nallasivang/dazl-client | 69cd89a2d82b7785a47654b85f2481d9d179800e | 03e0fbe62ca816fd947e9a6857a3320aa2d906cd | refs/heads/master | 2020-06-13T05:11:07.078570 | 2019-06-28T18:33:10 | 2019-06-28T18:33:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,414 | py | expr_util.py | # Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Utility methods operating on a full expression tree.
"""
from collections import defaultdict
from typing import Set, Dict
from ._rewriter import RewriteContext
from ..model.type... |