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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d46bcefbd2c4b09f59b2df88a3a7e0603ab2287 | ad5dd856e1592a00cec2c924b3a8536154d33291 | /main.py | 18d0326c9387f6a919d3333e47f316d631de0c3e | [
"Apache-2.0"
] | permissive | csy1993/PythonLeetcode | 86740dc076f8110d9c31428a4fc141289fc94278 | 98fd9b1639626459fbf81bf94727775d39248dde | refs/heads/main | 2023-02-28T20:31:33.788274 | 2021-02-10T01:34:11 | 2021-02-10T01:34:11 | 337,098,496 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 66 | py | main.py | '''
* @File: main.py
* @Author: CSY
* @Date: 2019/7/27 - 9:40
'''
|
e21babb8665aac43f6a939af99cea76b904baccf | 82d9fc11f61f2eba81639b2acfca2264d2f8af9a | /P3.py | 298e747f826b022a211e1abe0c264e5e2b0f7239 | [] | no_license | AnoopPS02/Launchpad | 94d1a74f0f90f0573163f4e5922d3f2ca72f196b | 7e3fb45db2a923a1a44733d77b085a6b36ae9497 | refs/heads/master | 2020-08-31T04:20:24.707704 | 2019-10-30T18:10:15 | 2019-10-30T18:10:15 | 218,586,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 225 | py | P3.py | *Given a element, search the entire list for the element and return the indices that match the list*
List=[1, 2, 3, 2, 0, 65, 21, 4, 2, 10]
Ans=[]
Key = 2
for i,j in enumerate(List):
if j == Key:
Ans.append(i)
print(Ans)
|
2405db74683600daffdb2c640da4c8fb00e75b20 | da7f86ba158d16d319fea7b460110f36a3a9f8b0 | /src/experiment/experiment_sklearn.py | 9944941e37c1ccc5449e19cd797661f910c38134 | [] | no_license | elohhim/mag-learn | 485e05e235cbc343776534982c25f9469119f114 | 0402e2ca2fad00e86515dc34f33502a25600ab69 | refs/heads/master | 2020-04-04T09:35:19.976886 | 2019-04-17T18:50:37 | 2019-04-17T18:50:37 | 155,823,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 955 | py | experiment_sklearn.py | import numpy as np
from sklearn.neural_network import MLPRegressor
from experiment.base import Experiment, ExperimentContext, ExperimentDataset
MAX_EPOCHS = 1000
class SklearnExperiment(Experiment):
def create_model(self, dataset: ExperimentDataset):
return MLPRegressor([self.NEURONS_BY_LAYER
... |
6b724d56d8814a8749686f0f51eee54a765b9b50 | 99e5e706edc99cec187491a587bdbb3f715e0569 | /surveys/models.py | ce5de563854b9c6300cd80e9944df68b731723b3 | [] | no_license | piscoiandrei/PureSurvey | 899f9def690ecaccc8c89e7c7c1315750477dd76 | 50f88b53d343bf4fe0a1e70bd77396ded98b82e3 | refs/heads/master | 2023-09-01T00:21:59.660457 | 2021-05-26T15:04:14 | 2021-05-26T15:04:14 | 308,888,085 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,451 | py | models.py | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Survey(models.Model):
created_by = models.ForeignKey(User, on_delete=models.CASCADE, null=True)
topic = models.CharField(max_length=50)
description = models.CharField(max_length=200)
def __str__... |
468bcacca9fddb890eaaf717cc7587c5bc15a6f2 | 291a34abdc9c80f37bdb925c2be2d9bd19ec3f60 | /mysite/bbs/form.py | db638fe0b6928cc345ee291cc2734e4f1c06fb34 | [] | no_license | biones/bbs | 63b0f6123c42aef3fd9b7d904f6d84ad6b868edc | 11fbcebd1377855eb233e7731b196dd2bc4b0b4c | refs/heads/main | 2023-06-24T06:56:05.159931 | 2021-07-15T11:28:35 | 2021-07-15T11:28:35 | 386,212,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | form.py | from django import forms
from .models import Posts
class WriteForm(forms.ModelForm):
class Meta:
#モデルを指定
model = Posts
#フォームとして表示したいカラムを指定
fields = ('text',)
|
15186257f84767fe7e048d3e87d928cd37b12337 | 5857e95379904e2f807847c49d51335224b7bd2b | /featureExtraction.py | fa91fde0fce51c0f672251add72caed1aa54c14a | [] | no_license | Ruwanari/Feature-Extraction | c554ec8f3cf4e1f25aae6d8ab45f045b606b2251 | 55fdb4ea9043c3385b37cc7bda7efcc451848adb | refs/heads/master | 2020-05-22T12:48:21.115237 | 2020-01-21T16:09:39 | 2020-01-21T16:09:39 | 186,348,110 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,726 | py | featureExtraction.py | # -*- coding: utf-8 -*-
"""
Created on Mon May 13 10:37:22 2019
@author: Ruwanari
"""
from __future__ import print_function
import librosa
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import butter, lfilter
import os
import csv
# Preprocessing
from sklearn.model_selection ... |
5dd3c6c175fb36ec9b730d321ae9662034f88eb4 | 0ec82fca9536d48617e33aa2f98d62852a4ee957 | /NLP_30~39/files/test.py | 780a8e62bacf65945ac2ccd0e5006ac874f74182 | [] | no_license | tttakano/NLP_100_knocks | a7f6bd337963de54ebcdc5a636cab61d647479d1 | 5dbe493ff2d41cefb7b90bd7536c66d2675a66e7 | refs/heads/master | 2021-01-19T17:05:33.969434 | 2017-09-07T15:22:34 | 2017-09-07T15:22:34 | 101,045,678 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 290 | py | test.py | # coding: utf-8
import matplotlib.pyplot as plt
import matplotlib.font_manager
fontprop = matplotlib.font_manager.FontProperties(fname="/Library/Fonts/fonts-japanese-gothic.ttf")
plt.plot( [1,2,3] )
plt.title(u"グラフタイトル", fontdict = {"fontproperties": fontprop})
plt.show()
|
17bb8d9eca1f1d0182a3a568e3028226a6f97803 | b90d02df1a7b8323a687add996055bf9d2bfa357 | /trackdeploy.py | e635699ac8241272543bb3b367efe30df575a6c2 | [] | no_license | rdavae/pipeline-stuff | 1b5f3510c6ed844681f240f5c3cc4308b4e810dd | b26503df31a3e0dbe9263c154764b0673d266946 | refs/heads/master | 2020-03-20T02:29:54.373280 | 2018-06-12T20:19:53 | 2018-06-12T20:19:53 | 137,109,216 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 36 | py | trackdeploy.py | import sys, json
print (sys.argv[0]) |
5b651fa452f356f6b8b73d76a5f8ade00f365989 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02614/s524685343.py | 282a44e5169678c5612a2ba55e90ec065e7cdae6 | [] | 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 | 394 | py | s524685343.py | H, W, K = map(int, input().split())
C = [list(input()) for _ in range(H)]
ans = 0
for row in range(2 ** H - 1):
for col in range(2 ** W - 1):
count = 0
for i in range(H):
for j in range(W):
if not ((row >> i) & 1) and not ((col >> j) & 1) and C[i][j] == '#':
... |
7691ee6bb0a4722f27c95d15729b5e62a30cd675 | f0726dc19532091c79daeaad7d8ed88750b78722 | /phase1_DataPreprocessing/header_creation.py | 0df9cb170dfa050d3b822b4b8591f9c768b04fc0 | [] | no_license | shiji203/LongLeadExtremePrecipitationForecasting | 5756a5554426d8ae00a53c535ffb8ceef850bce4 | 3a1cbbaba27dabbd055d72257c5c5b216c6784e1 | refs/heads/master | 2021-09-03T15:17:25.518469 | 2018-01-10T03:25:53 | 2018-01-10T03:25:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 727 | py | header_creation.py | #This script is used to create the headers for the feature table
#The headers will be in the format T9z3S1 T9z3S2 T9z3s3 .....
import csv
meteoVariable = ["z3", "z5", "z1", "u3", "v3", "u8", "v8", "t8", "pw"]
time = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
header = []
#We need the header so as to keep track of the columns ... |
c0afac819bda07845dd4b8f059b13973cbbe8a2f | 309f464ad1a70ccc59ed07fb14e3cb28f784b1f6 | /src/request_engine.py | 7441876b1821a100c0e60c0ea44791538e555a92 | [] | no_license | joncatanio/WorldSeries2016 | 57b00f68417c1c561f1bb14c841bcd15dab5a513 | 91e833a60ffffdc38a4acf7bc1f66a2b2b0cf28a | refs/heads/master | 2021-01-11T05:47:51.465588 | 2016-11-01T04:25:51 | 2016-11-01T04:25:51 | 72,146,362 | 1 | 1 | null | 2016-11-01T04:25:52 | 2016-10-27T20:38:13 | Python | UTF-8 | Python | false | false | 2,990 | py | request_engine.py | import requests, json
import xml.etree.ElementTree as ET
from team_streaks import getWinLoseStreak
from batting_pitching import getPitchAndAvgData
from rivalry_factor import getRivalries
from standings_comparison import getStandingsComparison
from thresholds_globals import *
from team_utils import fillTaglines
def get... |
b6580790b28e9749aadd836de9eb38d3973cb111 | 2488d7c80ffaa76c8148558a1339733f0d8c0bcb | /lint/doseol.py | eb9dea3de94a383190c2640ea3f5b3b7ebb65de9 | [
"BSD-2-Clause"
] | permissive | dev-pro-jma/rebus | 0bf23490aa26544c2c01c7a543a20a49c2e3ccf4 | b880e67ad9cd4ec6be316ca7697a7077ea1b5f17 | refs/heads/master | 2022-12-23T12:01:37.060011 | 2020-09-21T21:42:45 | 2020-09-21T21:42:45 | 297,467,079 | 0 | 0 | BSD-2-Clause | 2020-09-21T21:38:29 | 2020-09-21T21:38:28 | null | UTF-8 | Python | false | false | 816 | py | doseol.py | from pylint.interfaces import IRawChecker
from pylint.checkers import BaseChecker
class DOSEOLChecker(BaseChecker):
"""Check absense of DOS end of lines (CR)"""
__implements__ = IRawChecker
name = 'dos-eol'
msgs = {'W9902': ('Used CRLF instead of LF', 'dos-eol',
'Used when lines... |
9fe7a879c0b8d3110ea28b6cc6e03644fcfd9070 | b8a2ab39fba306ed9be6c5d811bd3dbb756d5753 | /src/rheia/utils/cache.py | ef90fc80700528910f9c631745f40d78480bcabe | [] | no_license | zedr/rheia | 569635682d4efc1521e4d9ef749b5abd8317ad01 | 350651ba8ad64f47b0b74a097fbea84b27b9dd3c | refs/heads/master | 2021-01-19T04:34:57.903665 | 2018-09-16T21:12:14 | 2018-09-16T21:12:14 | 64,706,816 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 468 | py | cache.py | import functools
def cache_on_view(method):
"""A decorator that caches the value of properties or methods on views.
"""
@functools.wraps(method)
def inner(view, *args, **kwargs):
storage = "__cached_" + method.__name__
try:
result = getattr(view, storage)
except At... |
ed4bbadb40f234cfe3da259549e23d508ed7ca81 | 6ac58764cceab22b5f55f16896a9d2a7c5a6b52c | /1.IDE/d1.py | 849eaa2a35c365360041e5eed96250609d0ff5bf | [] | no_license | wangxiao9/basic_python | 401427628229e5df70de7437ad3e9d7d220f205a | b0a606ca1caa5f5030e4f1562d3d2bdde396ef94 | refs/heads/master | 2021-02-06T19:14:39.107588 | 2020-02-29T09:46:52 | 2020-02-29T09:46:52 | 243,942,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 50 | py | d1.py | print("hello python")
# 注释
"""
长注释
""" |
9956a916f64165630e453335766747c7f7078949 | 8f6db099f7b7d90229301dfa25c9bc28e1ecfec1 | /homeassistant/components/switch/mochad.py | b7ebcabeb86f76409d2d6dfa58d6ec51efccab5d | [
"MIT"
] | permissive | NateRobinsonS/home-assistant | cc3d7f50ee4456659b4b3f4cadebc8eb2fda863f | d414f41d99db3092d1db2142de2c4d5611f06e07 | refs/heads/dev | 2021-01-11T22:45:59.038429 | 2017-01-15T14:41:49 | 2017-01-15T14:41:49 | 79,011,112 | 1 | 0 | MIT | 2020-02-29T11:47:30 | 2017-01-15T07:39:48 | Python | UTF-8 | Python | false | false | 2,399 | py | mochad.py | """
Contains functionality to use a X10 switch over Mochad.
For more details about this platform, please refer to the documentation at
https://home.assistant.io/components/switch.mochad
"""
import logging
import voluptuous as vol
from homeassistant.components import mochad
from homeassistant.components.switch impor... |
244818436ebf0f1dedda2559e705ec1aae7f4f6c | 856e6f5853f139e652f0be3c3db19c245b5d00a8 | /Correction/Test.py | b636323534a08117ec73003a24f50d9199c387f8 | [] | no_license | Vicoj/Labo2-ExpressionReguliere | c9bcabd26a0b9a9e87557453e6d769978f17fd6f | d857cb60d492c2d1109ff1298b5931e7fb4319bf | refs/heads/master | 2022-10-27T04:20:44.470752 | 2020-06-14T12:47:13 | 2020-06-14T12:47:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 181 | py | Test.py | import re
pattern = r'\d+'
p = re.compile(pattern)
m = p.match('72 est égal à 70 + 2')
if m is not None:
print(m.group()) # 72
print(p.findall(’72 est égal à 70 + 2’))
|
427f4194c4511de40d57a1af8f893920ef114cc2 | 1cc491e637e99a00849e5f763a54538e5cd2ee8a | /source/customresources/custom-resource-py/lib/demo.py | 1eed9a7aa9ffa5c2554ee11cfa8aefb005bab4cc | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | awslabs/live-streaming-with-automated-multi-language-subtitling | a44874ab04c6f27767a6763d325850ae8cbd233b | cca85dc99305707683e25d0066e9376b2e22cd97 | refs/heads/master | 2023-08-15T11:22:44.562546 | 2021-12-16T19:17:38 | 2021-12-16T19:17:38 | 157,429,875 | 158 | 89 | Apache-2.0 | 2021-04-14T18:06:42 | 2018-11-13T18:51:51 | Python | UTF-8 | Python | false | false | 2,316 | py | demo.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
##############################################################################
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License Vers... |
686eaa4119ced7da7023842794848168c2b70bd1 | 3587a7a596cabc92b6dcce1f594de640ac3897a4 | /features/images/images.py | f9a2d683874561aeacbe021aa2d03d14e0a9d13c | [] | no_license | globus-labs/covid-analyses | a35d56303daca11d751e9ddd3f7be90ea3fec1bc | a145ed2eb90c9d4d26e1b1d5d20b0569afc29912 | refs/heads/master | 2022-09-05T04:27:00.113885 | 2020-06-01T21:18:07 | 2020-06-01T21:18:07 | 252,787,491 | 7 | 1 | null | 2020-05-28T01:49:15 | 2020-04-03T16:43:29 | Python | UTF-8 | Python | false | false | 2,905 | py | images.py | import parsl
import os
from parsl.app.app import python_app, bash_app
import argparse
import re
import time
from pathlib import Path
@python_app
def compute_images(smiles=None, smiles_file=None, start_index=0, batch_size=0, out_file=None, bad_file=None, save_csv=False, overwrite=False, save_gzip=False, molSize=(128, ... |
f83abd4f401748d4f78c791e4860786cd7441890 | 61e68e3a4d6cc841da4350dc193315822ca4e354 | /lecture/7_최단경로/2_힙라이브러리사용예제.py | 47f6417c1ab02bbe045ae934665ae5c7dd38344f | [] | no_license | sswwd95/Algorithm | 34360cd333019d6ded60f967c19aa70f1655e12a | a70bdf02580a39b9a5c282a04b0b2f8c2cb41636 | refs/heads/master | 2023-04-16T21:05:07.293929 | 2021-05-08T10:58:05 | 2021-05-08T10:58:05 | 362,651,885 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,040 | py | 2_힙라이브러리사용예제.py | # 힙 라이브러리 사용 예제 :
# 최소 힙
import heapq
# 오름차순 힙 정렬(heap sort)
def heapsort(iterable):
h = []
result = []
# 모든 원소를 차례대로 힙에 삽입
for value in iterable:
heapq.heappush(h, value)
# 힙에 삽입된 모든 원소를 차례대로 꺼내어 담기
for i in range(len(h)) :
result.append(heapq.heappop(h))
return result
... |
87ebea91ff65a9f4ae21fc8aeb0446ca0466c891 | dcdd1df5fe39302f0fc4fd2f9a5e0bbc3784203a | /backend/models/dislikes.py | 532e055ba672a4bd1d2a73810f0bb9aa243f2670 | [] | no_license | larathompson/pavlovadating | 08442bd2c21e6cbc5d2940bb43aa76a40be5fe3c | e206c1eaa6a5c26abe478d2c0b2556c9897aa210 | refs/heads/master | 2022-12-06T06:23:09.270206 | 2020-08-26T13:58:10 | 2020-08-26T13:58:10 | 283,822,517 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | dislikes.py | from app import db, ma
from models.base import BaseModel
from marshmallow import fields, post_load
# from models.user import User
class Dislike(db.Model, BaseModel):
__tablename__ = 'dislikes'
disliked_id = db.Column(db.Integer, db.ForeignKey('users.id'), primary_key=True)
disliker_id = db.Column(db.Integer, db.F... |
266c18af4b9be06bfbaa5798e9fe0e80fbbdc15f | dce79cac416218a1a6dbc2b9faa7c54c20215103 | /python/call_usage.py | 17e3ca288ef06cda0ce515d47d21def6ac47d328 | [] | no_license | hansrajdas/sample-programs | 798d98f1ef944732789e11f060efb9a5cdca8c49 | 2d6e1a19365730ba98c544245140556d0df6a8af | refs/heads/master | 2023-05-10T19:45:58.126463 | 2023-04-29T20:38:55 | 2023-04-29T20:38:55 | 113,675,931 | 0 | 5 | null | 2022-10-14T11:42:19 | 2017-12-09T14:34:47 | Python | UTF-8 | Python | false | false | 789 | py | call_usage.py | #!/usr/bin/python
# Date: 2018-10-16
#
# Description:
# __call__() method makes an object of a class and class name as callable.
class A:
g_data = []
def __init__(self, data):
self.g_data.append(data)
def __call__(self):
for d in self.g_data:
print (d)
a1 = A('Nisha')
a2 = A('Mahabeer')
a3 = ... |
e1f46934f4589fd07e5780557082d6468498d93f | 820fd9091a1f5a537b6ac3edb3c013d623d4aade | /server.py | 8043b068ddadfa60c02f73823f06dc5917de9779 | [] | no_license | ren4nw/app-control | f56843c4a3a581e809b3e39bc54b266ed223734a | ce951f28958a4bad1a8e0962bed4484bbf96a41c | refs/heads/main | 2023-07-02T17:57:50.565601 | 2021-08-11T03:47:20 | 2021-08-11T03:47:20 | 394,852,177 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,382 | py | server.py | from aiohttp import web
import socketio
import pyautogui
import socket
import pyqrcode
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
localip = s.getsockname()[0]
s.close()
PUBLIC_DIR = './app-control/build'
pyautogui.FAILSAFE = False
class Control:
def move(direction, speed ... |
86601288a2df0074d906b255a26e5fab1f763aa9 | bb42e21d032315860ae79b6c90e741946f5be544 | /学员作业/庄庆华/模块一作业.py | 67a4b3a2db322362e22f50b1a94d4c32181f4828 | [] | no_license | wuyongqiang2017/AllCode | 32a7a60ea5c24a681c1bdf9809c3091a1ff3f5fc | eee7d31a3ba2b29f6dec3a6d6c688d40cba7e513 | refs/heads/master | 2023-04-09T16:38:26.847963 | 2018-03-06T02:50:06 | 2018-03-06T02:50:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,548 | py | 模块一作业.py | __author__ = 'Administrator'
# 基础需求:
# 让用户输入用户名密码
# 认证成功后显示欢迎信息
# 输错3次后显示退出程序
# _name = "Shownguo"
# _password = "123"
# count = 0
# while True:
# if count == 3 :
# break
# name = input("Username:")
# password = input("Password:")
# if name == _name and password == _password :
# print(... |
427fa867b9356a0def11b1e0c8390f58adbb9ae1 | a8039d69f32108d0cc46143cf6ea409dbe0a84e8 | /src/components/submenu_file.py | 86e72787035a0be824b59f2d40b5fba8aa6ecb94 | [] | no_license | StoryMonster/MapDesigner | 5fb4ab4358713b02f12fb7474f7e5bbb97ff1b52 | f81f7f06867a68fd531f845d3885d74db8a4a73d | refs/heads/master | 2020-09-13T20:06:23.785280 | 2019-11-22T07:57:27 | 2019-11-22T07:57:27 | 222,890,365 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,480 | py | submenu_file.py | import os
from copy import deepcopy
from tkinter import Menu, filedialog, Frame, StringVar, LEFT, Button, Entry, Toplevel, messagebox, Label
from model.constances import PROJECT_SUFFIX
from model.data_parser import DataParser
from event.event_dispatcher import evtDispatcher
from event.event_ids import EvtIds
class Fil... |
9a843c3109830f1115c7562a1a9b7d0b6c0fa9c4 | a635214694ab6c43118741640f34d8dcfb024c75 | /networkX_community.py | b4410cda8cd6c6dad1f8c7dbf74f0e4be4d3eb62 | [] | no_license | robin93/complexnetwork | 482f2142ce7087ba583c4ec346a4108e244fd48d | a9fa2b78f442f9b97a9d45d520e1143db49d64fc | refs/heads/master | 2021-01-10T05:17:40.344804 | 2016-04-17T20:50:00 | 2016-04-17T20:50:00 | 53,071,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 672 | py | networkX_community.py | import pandas as pd
import numpy as np
import networkx as nx
import six
import matplotlib.pyplot as plt
import csv as csv
import os
cwd = os.getcwd()
print "Reading Data"
data = pd.read_csv(os.path.join(cwd,'selected_timestamp_data_03_11_processed.csv'),header = 0,sep = ",",nrows=100)
print "Subsetting Data"
subset ... |
b1def29fadbfa3459944db5d8041c6978faacc6f | 738ad540e0690013a83d2163aa5f48b7e0f9727f | /tests/integration/security.py | fbff6adaa9853c15f2f7a301e80e38f48466127c | [] | no_license | MechanisM/django-accounts | 6cb1bb56695b36878f1888905e76dba1ee1dc435 | 9b56f7db7c56fd759cd519636d44dc9dcd844854 | refs/heads/master | 2020-12-24T17:17:09.741953 | 2009-08-24T17:46:10 | 2009-08-24T17:46:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,917 | py | security.py | import causes, effects
def require_ssl(self, path):
#-------------------------------------------------
# If ssl is not on for GET, redirect to ssl page
#-------------------------------------------------
self.assertState(
'GET',
path,
[
causes.valid_domain... |
dd879b4bb9d648794b92c83e2a5f38cb89305ae3 | 087ebc4125b86e50411644bbf401de9fd2549d67 | /python17/languagelearning/7-3.py | d3c6a524cdeeefd35158b4c6590d03f687ff7e3c | [] | no_license | linzh17/pythonlearing | a785041cc0fe8044cd1c67315d5e21066d3d18d0 | 0384e638248913a9557a0fa1fe4aa018a327dcb6 | refs/heads/master | 2021-05-10T18:20:24.079200 | 2018-01-23T15:33:28 | 2018-01-23T15:33:28 | 118,629,608 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,054 | py | 7-3.py | #使用while循环来处理列表和字典
#在列表之间移动元素
unconfirmed_users = ['alice','brian','candace']
confirmed_users = []
while unconfirmed_users:
current_user = unconfirmed_users.pop()
print("user: " + current_user.title())
confirmed_users.append(current_user)
print("\nthe confirmed users")
for confirmed_user in confirmed_... |
2ada7b5c44ee6d6249e0c145fcc5516e1473e005 | 7f2c5efba9bfb47f3e0f4c6da52fab8c73331f07 | /vowel.py | b55c33d985e277252a91b758ab2b2792cea999cd | [] | no_license | Akilarajendran97/guvi_codekata | d87d6b78df10b162fbd59ec51fa51f91f6c84eb6 | 0c54de90bb8ae763411e016a187681add2d5b8e6 | refs/heads/master | 2021-04-28T05:09:38.303240 | 2018-02-20T10:30:23 | 2018-02-20T10:30:23 | 122,173,139 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | vowel.py | mystring=raw_input()
string=['a','e','i','o','u']
if(mystring in string):
print("its a vowel")
else:
print("its a constant")
|
45e8cb20127aae008e670e3dc028b1b0c1ef3862 | 21175b7688de6803eb217ab0a90385d3656c21a6 | /ng.py | 263952aa824af8091222bb35733f7e74a001f569 | [] | no_license | tanupat085/labs | dfa1a5f7bc3ba8c096d22a745bc91732e2013ab8 | da3330d9debdf25be9107dcf45f60effb53b97db | refs/heads/master | 2022-06-17T05:16:12.846753 | 2020-05-09T09:37:20 | 2020-05-09T09:37:20 | 257,029,210 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,168 | py | ng.py | import pi
import math
class NumToWords(number , int) string {
var words string
var unit = map[int]string{
0: "ล้าน",
1: "สิบ",
2: "ร้อย",
3: "พัน",
4: "หมื่น",
5: "แสน",
6: "",
}
var value = map[int]string{
0: "",
1: "หนึ่ง",
2: "สอง",
3: "สาม",
4: "สี่",
5: "ห้า... |
fa23e250477ea8da0e77a0d54c09f5d86863dc39 | 31b15884992de03806de9cc730f6b7fe76d57b24 | /MultiProcessing Practice/03PreLocks.py | fa74fa4a37816ead9983777f53f585523f004962 | [] | no_license | neharathig/Python-Practice | da3324712d73066748749d1973dd7dd6448f8670 | 846a59e697b5b904d65ff68705dcb07df0588fbf | refs/heads/master | 2022-04-10T12:03:48.062956 | 2020-03-11T18:28:15 | 2020-03-11T18:28:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 484 | py | 03PreLocks.py | import time
from multiprocessing import Process, Lock, Value
def add_500_no_mp(total):
for i in range(100):
time.sleep(0.01)
total+=5
return total
def sub_500_no_mp(total):
for i in range(100):
time.sleep(0.01)
total-=5
return total
if __... |
0ece5826b208bc711ebba6665d5f0820b7e31f1c | 7ae0fce5933f48ec36e5ed7b0fbaa45a594fbeef | /wine_url.py | bf695131ca5d44d1d3a5f16d01fc73be3ffd2448 | [] | no_license | christer19/wine-scraper | 838b7b615049c9ba53e87b8be6235f56a3bdf240 | 04d25275b3fe3cac4f83bb644100a96de9591329 | refs/heads/master | 2022-05-25T10:16:27.769400 | 2020-04-28T21:22:50 | 2020-04-28T21:22:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,485 | py | wine_url.py | import lxml
import requests
import random
import sys
from lxml.html import fromstring
def scrape(urls, article_urls):
user_agent_list = [
"Mozilla/5.0(Macintosh;IntelMacOSX10.6;rv:2.0.1)Gecko/20100101Firefox/4.0.1",
"Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.1)",
"Opera/9.80(WindowsNT6.1;U;en)Presto/2.8.131Vers... |
e7dea242c91cb631db18b7df75e67b117c0c476b | 6d6cb8f13ecbcce7145bfdaca70216f2a29e0a39 | /LossFunctions/dense_test.py | c53bad91e10cf04785c3ab7d682355d1babfb761 | [] | no_license | longfei-zheng/Tensorflow2_Basic_Projects | a85ced582d94a057b9b2d44ca70e53ca14d3cd90 | d18ee6de9a2d116536b92e823735379c2b75f113 | refs/heads/main | 2023-04-16T14:54:25.720980 | 2021-04-25T13:02:40 | 2021-04-25T13:02:40 | 361,051,967 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | dense_test.py | # -*- coding: utf-8 -*-
import numpy as np
import tensorflow as tf
from tensorflow.keras import layers
x_np = np.array([[1.0, 2.0, 3.0, 4.0]], dtype=float)
x_tf = tf.convert_to_tensor(x_np, dtype=tf.float32)
model = tf.keras.Sequential()
model.add(layers.Dense(kernel_initializer='OnesV2', bias_initializer='OnesV2', un... |
5e8eb6714b5ed527c7670d395c60c1916a8759db | b08a5a882f878fcb28051e872437da089c540ac7 | /ideas/dab_analyse_series_behavior.py | f51342fc746218cf8347504715dd61aaf194e90f | [] | no_license | faizan90/fourtrans | 4ef2e3364a03246c7a1ca0e1abd675fc9aadf294 | ba636f45d00d2d7eb69818613d40bf6c9ec55be7 | refs/heads/master | 2023-07-25T00:53:45.274627 | 2023-07-06T19:49:43 | 2023-07-06T19:49:43 | 170,131,006 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,936 | py | dab_analyse_series_behavior.py | # -*- coding: utf-8 -*-
'''
@author: Faizan-Uni-Stuttgart
Dec 15, 2022
1:49:15 PM
Keywords: Contribution of different quantiles to total variance.
'''
import os
# Numpy sneakily uses multiple threads sometimes. I don't want that.
os.environ['MKL_NUM_THREADS'] = '1'
os.environ['NUMEXPR_NUM_THREAD... |
8434899bd899a01ece0e16687eaa45cb41001be5 | 569b63f2385e45a783f84fab611091d6c5e09123 | /bfgn/architectures/flat_net.py | 16952e6b85bdca37ba71a8c0d50a93e49509a0a2 | [
"MIT"
] | permissive | dmarvs/bfg-nets | e12ab537ba49f818335dd7f5102b3acea3bbc07f | 0c8e7f469b6a50c7b167ead98cb545d238dee214 | refs/heads/master | 2021-07-09T20:56:30.040711 | 2019-10-14T22:54:19 | 2019-10-14T22:54:19 | 233,686,957 | 0 | 0 | MIT | 2020-01-13T20:28:28 | 2020-01-13T20:28:27 | null | UTF-8 | Python | false | false | 1,826 | py | flat_net.py | from typing import Tuple
import keras
from keras.layers import BatchNormalization, Conv2D
from bfgn.architectures import config_sections
class ArchitectureConfigSection(config_sections.FlatMixin, config_sections.BaseArchitectureConfigSection):
pass
def create_model(
inshape: Tuple[int, int, int],
n_cl... |
211b8ce8f1d2af4d9e58884a03cd40b5ea07b0ba | 31fbe384457b35b9a6fcd150ec69b8aed35977d5 | /TriviaServer/questionloader.py | 373af56889f921d4b1b8037e78f208a014124b80 | [
"MIT"
] | permissive | yotam180/braingamestrivia | c9becc6582045ef1790fc7800678074b155a57ce | 6ea91a66512bb5acff45b1250829f1877e2ea864 | refs/heads/master | 2021-01-21T10:52:20.485873 | 2017-06-29T08:51:14 | 2017-06-29T08:51:14 | 91,707,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,766 | py | questionloader.py | categories = {
0: "Any category",
9: "General Knowledge",
10: "Entertainment: Books",
11: "Entertainment: Film",
12: "Entertainment: Music",
13: "Entertainment: Musicals & Theatres",
14: "Entertainment: Television",
15: "Entertainment: Video Games",
16: "Entertainment: Board Games",
... |
3c9049445f3863144c9d79d54bbb46e8976e0410 | f1ae342f7e9ba24d1c36ce71469f7c360cb8b76c | /utils/installer/tools/libs/utils.py | 6f9f682a8517c72accb31acc93cee29b594522bd | [
"MIT"
] | permissive | xyder/dotfiles | fa29cb3c61332a4635ff3e45ce1dfbd95d458b9d | 9f48005d8204c5305b65406e87c279ff393383a3 | refs/heads/master | 2023-07-24T09:54:38.150831 | 2023-07-17T11:41:02 | 2023-07-17T11:41:02 | 46,769,461 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,045 | py | utils.py | import argparse
from enum import Enum
import json
import os
import sys
def explode(*args):
return os.path.abspath(os.path.expandvars(os.path.expanduser(os.path.join(*args))))
def locate_path(settings, *args):
"""
Builds a path from an array. It appends a root if specified path is not relative.
:para... |
60c0a71f6030ff2a18aa3e5daec8a6ad30570d83 | 9d2fedb249f05d2ee09fe6e66eaf3913ee54b610 | /projetinho 2.py | 24f26bdbf762658c0246de345bedcc0cb9467edf | [] | no_license | brunosw74/PROJETINHOfelas | 99f281c6c1f2c78d03cca9f0b92b7052cb0d0edc | 26a6c2036c94e93fec6d5e72b9ef6633211624fd | refs/heads/main | 2023-07-20T03:09:10.345007 | 2021-08-30T03:38:54 | 2021-08-30T03:38:54 | 400,709,606 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 69 | py | projetinho 2.py | r = float (input())
a = 3.14159*(r**2)
print("A="+"{:.4f}".format(a)) |
d5438800cd45e9e36ad621111ae7986ed4f6ff32 | 4b18667dc583b6fb07abbca596bb44586219b80e | /tomotopy/coherence.py | f96c9444c9acfa07ff8584f68a6acce782603ddd | [
"MIT",
"BSD-3-Clause",
"MPL-2.0"
] | permissive | bab2min/tomotopy | 720e5a242773104d364a94d645ce8fa97f16a627 | 6ef712c63bad504801a981a4a52aa938c80f0bda | refs/heads/main | 2023-08-17T08:21:38.380731 | 2023-07-16T12:17:14 | 2023-07-16T12:17:14 | 186,155,463 | 512 | 71 | MIT | 2023-03-29T19:29:06 | 2019-05-11T16:19:29 | C++ | UTF-8 | Python | false | false | 13,335 | py | coherence.py | '''
..versionadded:: 0.10.0
This module provides the way to calculate topic coherence introduced the following paper:
> * Röder, M., Both, A., & Hinneburg, A. (2015, February). Exploring the space of topic coherence measures. In Proceedings of the eighth ACM international conference on Web search and data mining (pp.... |
d553d4fc9a4afb765b02d9426df013998a2a5142 | e4b99f3ab5f12506191f528f6b18fa540daba476 | /recordly-master/app/admin.py | 6d80c7bf62c371408840092c0d4da5a9ab8eac4c | [] | no_license | 4rlm/joel_repo | 71f9def997a9d8e2169afe6dd61b75e11cbf72c0 | 710fb5e8b058435f22083250a37e76899f3df676 | refs/heads/master | 2021-03-27T09:08:47.952995 | 2017-11-07T17:41:43 | 2017-11-07T17:41:43 | 109,862,990 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 331 | py | admin.py | from django.contrib import admin
from .models import Song, Artist, Album
class SongAdmin(admin.ModelAdmin):
pass
admin.site.register(Song, SongAdmin)
class ArtistAdmin(admin.ModelAdmin):
pass
admin.site.register(Artist, ArtistAdmin)
class AlbumAdmin(admin.ModelAdmin):
pass
admin.site.register(Album, A... |
2442f5d09b7260fb97177a1f7b35466d34767dcd | 0ae7e86941ca81151030b38fef760a858a2ca0d4 | /nytPuzzle.py | d1443e17768f37624ba441fd72a460286bad6c18 | [] | no_license | Eko35/EinsteinPuzzleSolver | 2a7651a16569c0e2fb2e1d788526b61b310fe59a | 68422bd79ba9a7591216a39898543ac7e1fb28bc | refs/heads/master | 2020-05-23T06:58:42.325677 | 2017-12-21T14:24:50 | 2017-12-21T14:24:50 | 186,669,980 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 35,972 | py | nytPuzzle.py | #!python2
import requests
import csv, re, time, copy, stop_words, requests
from bs4 import BeautifulSoup
from decimal import Decimal
import pygame
from pip._vendor.requests.packages.urllib3.util import retry
from pygame.locals import *
import sys
import math
import datetime
import string
from selenium import webdriver
... |
82ae381674c7c73633acbc70c46b22646c5b469e | 5e965dadd4bfaf0f69d96c7a0dd02833caed2c92 | /hackerrank/contest/game_theory/day_3/B/code.py | 8f75a28ea58bab6d2dc95fce9daee1e5c057c9d2 | [] | no_license | ideahitme/contest | a94d0cd9bd616bbdf378651285b0224eb4f3b99f | fed15465ce1545f5fe30934e8027d47cc79aac36 | refs/heads/master | 2021-09-02T00:51:58.845193 | 2017-12-29T14:13:36 | 2017-12-29T14:13:36 | 109,996,691 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,070 | py | code.py | import pprint
from sets import Set
pp = pprint.PrettyPrinter(indent=4)
def grundy_numbers():
dp = [[0 for _ in xrange(15)] for _ in xrange(15)]
for _sum in xrange(29):
x_from = max(0, _sum-14)
for x in xrange(x_from, 15):
y = _sum - x
win = False
set = Set()
for i in [-1, 1]:
for j in [-2]:
i... |
494ed36bcbf0db91195ea393729d6b5d6164ba24 | c6c5f7b111dc6bba0bb0024631b9f01f8f9b7861 | /NhanDangKhuonMat/NhanDangKhuonMat/create_data.py | 7de11959e17bb06197b9b7a7058c05beb2ba0df8 | [] | no_license | vanhungnguyen1402/NhanDangKhuonMat_CNN | 08fb4ea7d4f909f47f4174ee49953072336a8376 | d07f7eb60177fcd549838ce26549fec74783f2b5 | refs/heads/master | 2022-06-06T17:04:52.857222 | 2020-05-05T15:45:34 | 2020-05-05T15:45:34 | 261,512,969 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,292 | py | create_data.py | import numpy as np
import os
#Sử dụng để hiển thị thanh tiến trình với sự hỗ trợ tốt cho các vòng lặp lồng nhau bằng module tqdm
from tqdm import tqdm
import cv2
from random import shuffle
train_data ='train5'
test_data ='test1'
img_size =32
# load tất cả các ảnh này, resize lại kích thước 32*32 rồi reshape lại thàn... |
7ded7105329b3d8ae60a34ab3f45a9746c225e42 | a3746020cf091f433beb41bde1b62818b4de569b | /oracle_cmdb/ticket/restful_api/quick_analyse.py | b8c2db2d9e2896d3734fc3c546ac30746159f00e | [] | no_license | kk71/sqlaudit | 59bab5765a67f56f1dd2f3103812051c5acbbc49 | 747aaa02573a9c2b46a9e14415d27c0ab8e6158c | refs/heads/master | 2023-02-04T18:38:46.125746 | 2020-06-05T09:49:46 | 2020-06-05T09:49:46 | 323,559,338 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,471 | py | quick_analyse.py | # Author: kk.Fang(fkfkbill@gmail.com)
import utils.const
import new_rule.const
from utils.schema_utils import *
from restful_api.views.base import BaseReq
from ..sub_ticket import OracleSubTicket
from ticket.analyse import SubTicketAnalyseStaticCMDBIndependent
from ..single_sql import SingleSQL
from ticket.parsed_sql ... |
df40f4ec737f4e65bab850c0ac41cd4eb01eb64a | 624cdabdae2a0de6f0fb89cef5b3696be2ffd1c6 | /Vjezba2/razlomak.py | c375c97a40e992beb398508faac2e265f78fc9d1 | [] | no_license | helenazeko/PI | f7469041c6a8b5fd00b83d4317f90577917a8a8e | 67ea3b22ee7d983b2581afeb9f5db8eca164af51 | refs/heads/master | 2021-04-03T14:59:56.971369 | 2020-06-02T21:57:52 | 2020-06-02T21:57:52 | 248,369,774 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 979 | py | razlomak.py | class Razlomak(object):
'''Klasa razlomak'''
def __init__(self, brojnik, nazivnik = 1):
if nazivnik == 0: raise Exception('Nazivnik ne moze biti 0')
self._brojnik = brojnik
self._nazivnik = nazivnik
def __str__(self):
return '%d|%d' % (self._brojnik, self._nazivnik)
@staticmethod... |
0db771f289f2b5e892c346c933595075ef6ccc0d | 17d5fd357c890655dda5727bb9cf6a2334b5964f | /trees_ch08/reinforcement/justification_r8_3.py | 7963a50634e494f636d918e8c8034031ca82f82c | [] | no_license | wanyikang/dsap | bb04116b9b7b61e5bf6f495bb1123922b909771d | 70b23ead7a89e46a84d9d914e7c8fa678edd1f90 | refs/heads/master | 2018-09-04T19:21:45.075823 | 2018-06-04T11:53:23 | 2018-06-29T01:40:02 | 106,501,216 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 829 | py | justification_r8_3.py | # -*- coding: utf-8 -*-
# The depth of p can also be recursively defined as follows:
# * If pistheroot,thenthedepthof p is 0.
# * Otherwise, the depth of p is one plus the depth of the parent of p.
#
# The height of a position p in a tree T is also defined recursively:
# * If p is a leaf, then the height of p is 0.
# *... |
3038e8c9b3e1ba13839abf14690b2bdb3a877598 | 34270b40c84884a5894a7264e2f6d20aecbe36e3 | /mail.py | 67bb3b436c525eec156d56c5010a3fed50dfe853 | [] | no_license | aberriel/aws_python | 3b16c599cd7816b77697de775622dbdaddcacc5f | 4623fd5758ac5d01c8e767f3fa8f32a8794176d6 | refs/heads/master | 2020-12-24T11:07:51.774135 | 2016-11-08T18:54:34 | 2016-11-08T18:54:34 | 73,190,322 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,894 | py | mail.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from configuration import Configuration
from datetime import datetime
from datetime import timedelta
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
import email
import json
import smtplib
class Mail:
'''
Métodos para validação ... |
d7bf2616bed42581c74609c61fdbb0b42724911e | 49b1f7d4acb48c0316697cbaf5fdd112e3f4aaea | /Basics/format.py | a933e8b2f06357d3e93c71b7f76a07b67df11530 | [] | no_license | laurenc176/PythonCrashCourse | 2b1d3cce741a0235007b358e0ca06a07b1b68cbe | 0cd365a34611ba8e67bddd0f4df5b706e83506d9 | refs/heads/master | 2022-11-26T07:28:13.929016 | 2020-08-03T15:02:14 | 2020-08-03T15:02:14 | 241,431,232 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 879 | py | format.py | first_name = "ada"
last_name = "lovelace"
full_name = f"{first_name} {last_name}" #f-strings=format strings
print(full_name)
print(f"Hello, {full_name.title()}!")
message = f"Hello, {full_name.title()}"
print(message)
#old way of using format below:
full_name = "{} {}".format(first_name, last_name)
#addi... |
0b50ad5a8c2cf1cd29029d8bf5381e21deec9d51 | 7a08e3493bb7846bfef4d5841a31eb6ab235be2c | /ProjetoSQlite_BrunoCayres/database.py | 30ca62eced27a92e1f46f4ea85d304a97a72506d | [
"MIT"
] | permissive | cayresb/python-poo | ddf03641dbcd6c8e2202997d9ed97c52008c4a33 | 2b35a34da597fa1511cb2042c4ea3a5d9947b9ec | refs/heads/master | 2020-06-26T20:52:56.675835 | 2017-07-22T15:41:35 | 2017-07-22T15:41:35 | 97,028,902 | 0 | 0 | null | 2017-07-12T16:21:06 | 2017-07-12T16:21:06 | null | UTF-8 | Python | false | false | 3,104 | py | database.py | import sqlite3
class BancoDeDados:
"""Classe que representa o banco de dados (database) da aplicação"""
def __init__(self, nome='banco.db'):
self.nome, self.conexao = nome, None
def conecta(self):
"""Conecta passando o nome do arquivo"""
self.conexao = sqlite3.connect(self.nome)
def desconecta... |
6b4e6f448c4c1c561a613a10bbd696641ad58a90 | 79da16f4d4b9ebe620f13b69f86c7623730e74a3 | /models/discriminators/PatchDiscriminator.py | f0710bc9387356d40f3e50ea2d5694ec944f7990 | [] | no_license | EliasKassapis/DeepFaceImageSynthesis | c76a42b0fa7fa87a614ef09f8833d5eeb650ed32 | 4bff4d84e112fb7c3f7f6a598e9909146e4489a3 | refs/heads/master | 2020-06-12T19:21:49.644877 | 2019-06-30T18:51:19 | 2019-06-30T18:51:19 | 194,400,607 | 1 | 0 | null | 2019-06-29T11:58:38 | 2019-06-29T11:58:38 | null | UTF-8 | Python | false | false | 2,896 | py | PatchDiscriminator.py | from models.discriminators.GeneralDiscriminator import GeneralDiscriminator
import torch.nn as nn
import torch
class PatchDiscriminator(GeneralDiscriminator):
""" Defines a PatchGAN discriminator"""
def __init__(self, n_channels_in:int=3, n_hidden:int=64, n_layers:int=3, norm_layer: nn.Module=nn.BatchNorm2d,... |
cf4a0852b62715fbd9b5aba809272025508873e2 | ed734999279e36d8798e3f76f4aeea738e978c4d | /170401045-Week_3_Quiz.py | aa25ba23c173faf294fd9599334cefc05b6f6951 | [] | no_license | oguzbalkaya/ProgramlamaLaboratuvari | 0ea458f78c773e18e21ad23dbcfccbd283e5428d | b07f2ae9bc6b4cdd9e1f263f84dfd20b20fd0b90 | refs/heads/master | 2021-02-16T05:10:55.303128 | 2020-05-07T09:38:02 | 2020-05-07T09:38:02 | 244,969,605 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | 170401045-Week_3_Quiz.py | from sympy import Symbol,Limit,sqrt,pi,Integral,pprint,exp
## Limit tanımından türev bulma
t,t1=Symbol('t'),Symbol('t1')
St=5*t**2+2*t+8
delta_t,St1 = Symbol('delta_t'),St.subs({t:t1})
St1_delta=St.subs({t:t1+delta_t})
pprint(Limit((St1_delta-St1)/delta_t,delta_t,0).doit())
##İntegral örneği
x = Symbol('x')
p = exp(-(x... |
05c06cf58e5b4ef2373aaef09873cf10d28f227e | aa265e03e73f718d4008cfe30ada7ee32c852eec | /JOI/joi2013yo_d.py | edf19682ab1e60c2798d8cff3039c04203a951a9 | [
"MIT"
] | permissive | ryosuke0825/atcoder_python | 4fb9de9733cd9ef41c2ad9ad38b3f190f49d3ad5 | 52d037d0bc9ef2c721bf2958c1c2ead558cb0cf5 | refs/heads/master | 2023-03-11T22:47:56.963089 | 2023-03-05T01:21:06 | 2023-03-05T01:21:06 | 181,768,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 942 | py | joi2013yo_d.py | import sys
def input():
return sys.stdin.readline()[:-1]
D, N = map(int, input().split())
mx = [0]*D
for i in range(D):
mx[i] = int(input())
abc = []*N
for i in range(N):
abc.append(list(map(int, input().split())))
check = [[0] * N for i in range(D)]
for clothes in range(N):
for day in range(D):
... |
f88277d6ba7247ebf9e888eba169c5d78c691b15 | 43a2d2102d1b1889bbe40f924e8fbfa7b2f848ae | /src/plugins/utils/github.py | 702f95a722e7593ca7b0bb84a933818b65ce4b2b | [
"Apache-2.0"
] | permissive | rbowen/kibble-scanners | ca02ad57c678b53348efcc7a882ef7bc0afc480d | 9e53ef31472dac1776b84ccc76441b8087613002 | refs/heads/master | 2021-08-19T22:12:24.489646 | 2017-11-27T15:05:40 | 2017-11-27T15:05:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,577 | py | github.py | #!env /usr/bin/env python3
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache Licen... |
e03e79bff4dd9b22e9c3e69b39c927599b416031 | a8123a86db99b9365b10ba76dd509d58caa7bc10 | /python/practice/day23/exerside6.py | 8d3f773eb631569220ba47375fd0351f1018e7c3 | [] | no_license | smohapatra1/scripting | c0404081da8a10e92e7c7baa8b540acc16540e77 | 3628c9109204ad98231ae8ee92b6bfa6b27e93cd | refs/heads/master | 2023-08-22T20:49:50.156979 | 2023-08-22T20:43:03 | 2023-08-22T20:43:03 | 147,619,016 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 460 | py | exerside6.py | #!/usr/bin/python
#Write a program which asks the user to enter their age in years (Assume that the user always enters an integer) and based on the following conditions, prints the output exactly as in the following format (as highlighted in yellow):
#When age is less than or equal to 0, your program should print
a = i... |
bf63c752a09c8710b5c5d89d27ae4c43a5ea5c4e | b04800ee202edf91e2357af78dc80ad9639d2c13 | /transmit_main.py | b73ae8ef6594fd3bf9f433c39c64195379f68c1d | [] | no_license | eric99ying/Digital-Communication | 2118738519ca24da575fabac7ee5daacb7b5b849 | 2d10a255258aef1b86f5abf57b21c289218d8fa8 | refs/heads/master | 2020-05-07T21:25:30.043507 | 2019-05-03T01:00:35 | 2019-05-03T01:00:35 | 180,903,476 | 0 | 0 | null | 2019-05-03T00:42:47 | 2019-04-12T01:05:47 | Python | UTF-8 | Python | false | false | 643 | py | transmit_main.py | '''
Main script to run for transmitting computer during final demo.
'''
from huffman_encode import *
from error_correction_encode import *
import os
from text_to_sound import *
from test import *
import parameters
dir_path = os.path.dirname(os.path.abspath(__file__)) + "/"
if __name__ == "__main__":
convert(paramet... |
d249c27af409503f7d3ac2a37102917e8e8208a3 | cc02ed76c358ca17c38fd19d7df6fdb589af86d2 | /05 Convolution Neural NetWork/2. Classic CNN Model/2. AlexNet/3. AlexNet-Pytorch/2. AlexNet_Pytorch/AlexNet_Pytorch.py | e3fd0de3d860155e659d4bd869cd01645e794287 | [
"Apache-2.0"
] | permissive | Heyra-Joker/Deep-Learning | a43983f45852ca64efa630ad1bea6f1d9baef29e | f2cd5182b00b5fd4a68f293c2fef70e8f3a24a42 | refs/heads/master | 2022-02-19T20:29:43.148646 | 2019-10-08T04:15:14 | 2019-10-08T04:15:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,201 | py | AlexNet_Pytorch.py | import numpy as np
import torch
import torch.nn as nn
import torch.optim as optimizer
from torch.autograd import Variable
from LoadDataset import *
import matplotlib.pyplot as plt
class Forward(nn.Module):
def __init__(self, rate):
torch.manual_seed(123)
nn.Module.__init__(self)
self.CON... |
a8f83474226db8c9bca92f12c77c24bbf3d76c2c | d023b8cd4eeed7aa137c318d268ef5e15b11288f | /nodeManager/mqttClient/urls.py | 6f6dc6b64a545260cb059787d6707a0d147a4b64 | [] | no_license | chinhTEO/MQTTwebHMI | 39c7913aca6e1fa544d69de6e2348719d0dd3434 | b70e3a81824b29984c3dc506a506f6034e3e8ab4 | refs/heads/master | 2020-12-26T21:12:16.316756 | 2019-12-30T18:03:04 | 2019-12-30T18:03:04 | 237,644,564 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 215 | py | urls.py | from django.urls import path
from . import views
urlpatterns = [
path('connect/', views.connect),
path('publish/', views.publish),
path('subcribe/', views.subcribe),
path('update/', views.update)
]
|
3c8b0cd400bed94c0f982f494d61540290999a24 | 729c028e463dcf903af7e1374a95b70cf6982824 | /core/views.py | 493f0e7eb03e248af86baac33b5afbc0470316d3 | [] | no_license | Alexis7294/Venta-juegos | 12d8e0cbfe4ebda3398912c0199a458d1d07b2ef | 8f5ea794018bca9d1e8e1b9eef16f8cb28f5f907 | refs/heads/main | 2023-06-11T05:20:46.968507 | 2021-07-08T20:03:50 | 2021-07-08T20:03:50 | 384,234,919 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,925 | py | views.py | from core.forms import JuegoForm
from django.shortcuts import redirect, render
from core.models import Juego
from django.contrib.auth.decorators import login_required, permission_required
#rest_framework
from rest_framework import viewsets
from .serializers import JuegoSerializer
# Create your views here.
def inde... |
9895f800dfcb81925a11e2f974071e75369a75c9 | 23d536f7a37e8b8197c957ad861553042301657b | /tests/test_willinsure.py | 03a79ad93471bca1a8e932267656f4ac4cc57d19 | [
"MIT"
] | permissive | pji/blackjack | de37728461010f89bd04cd0c8d6379449f59a15f | 42153f7f358c6b47c98bd75022c45c1cfa68d54b | refs/heads/master | 2023-09-02T00:16:41.945102 | 2023-08-31T12:57:47 | 2023-08-31T12:57:47 | 231,638,116 | 0 | 0 | MIT | 2022-08-18T12:38:43 | 2020-01-03T17:54:12 | Python | UTF-8 | Python | false | false | 1,861 | py | test_willinsure.py | """
test_willinsure.py
~~~~~~~~~~~~~~
This module contains the unit tests for the blackjack.willinsure module.
:copyright: (c) 2020 by Paul J. Iutzi
:license: MIT, see LICENSE for more details.
"""
from random import seed
import pytest
from blackjack import model
from blackjack import willinsure as wi
from tests.co... |
9b2d4e0c51759d9770e46b67ee66d1e2e8024dd2 | 135cd0baaeed663d432d9b05658eec7116784166 | /Leccion18_Laboratorio_Mundo_Pc/raton.py | 9506988de7c7ce46d47aaeb759c4cd2345ec4812 | [] | no_license | inigoLlamaPeon/Lecciones_Python | 816d5f4e66b0cc579c7d0cf9017d1e62f4cd9070 | 1f7911d13e1f452ab723d9f622fca06344c6ea8f | refs/heads/main | 2023-08-22T09:10:42.705818 | 2021-10-05T09:44:42 | 2021-10-05T09:44:42 | 389,933,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 615 | py | raton.py | from dispositivoIO import DispositivoIO
class Raton(DispositivoIO):
cntRaton = 0
def __init__(self, tipoEntrada, marca):
Raton.cntRaton += 1
self._id_raton = Raton.cntRaton
super().__init__(tipoEntrada, marca)
def __str__(self):
return f'Id: {self._id_raton}, ... |
9a8e6197195913ab61db75d1cc1955200d98f6b5 | 8cc44eb6cc0fd2e74ce80246ad50e9d510591345 | /q18.py | 11747b42006ce5fec212001fc4357436096899c6 | [] | no_license | gitttttt/lc | 8b6521af300c6903f593b209783560b6b880d8ae | fa1a63cb192666fc6aa5c7c72130993818ea58d0 | refs/heads/master | 2020-05-30T07:12:56.955633 | 2016-12-14T03:16:42 | 2016-12-14T03:16:42 | 68,888,461 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,492 | py | q18.py |
def fourSums(nums, target):
# if len(nums) < 3:
# return None
# res = []
# for (i1, v1) in enumerate(nums):
# for (i2, v2) in enumerate(nums[i1+1:]):
# for (i3, v3) in enumerate(nums[i1+i2+1:]):
# if v1+v2+v3 == 0 and not res.__contains__(sorted([v1,v2,v3])):
... |
762f5136789c9c0075a5f82f0ef5b4cdae4e004f | c394abec48bf0031bcaf80b3b464997697841d71 | /python/pikov-old/visualization.py | b4200171f6ebc0fe87ee5d3a5f2a09c1aec0e18a | [
"Apache-2.0"
] | permissive | google/pikov | 745b8ad364dc6b5d49579f11e621997096e02414 | e13f114cab829c18c6a5447d5bec17990267d092 | refs/heads/master | 2023-09-05T09:41:12.472698 | 2021-06-30T15:21:59 | 2021-06-30T15:21:59 | 131,338,739 | 18 | 10 | Apache-2.0 | 2019-05-02T15:57:19 | 2018-04-27T19:48:44 | Python | UTF-8 | Python | false | false | 4,219 | py | visualization.py | # Copyright 2018 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
32d3b1caca3425b5bb13dff0b3110e157eb9e344 | 042cee41d313c4d488de3916e748f232f4a9c8c2 | /gfhardware/__init__.py | d4a88432d695663d9dd7425e694a1b32629cb4cb | [
"MIT"
] | permissive | ScottW514/python3-gfhardware | 2171d0ffb2e7cb91bbff9bc149d43aed293b653e | eeba1c46862346c48a69c66d68d5010af8ead882 | refs/heads/master | 2021-01-05T08:50:17.437396 | 2020-04-08T20:18:34 | 2020-04-08T20:18:34 | 240,960,825 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 172 | py | __init__.py | """
(C) Copyright 2020
Scott Wiederhold, s.e.wiederhold@gmail.com
https://community.openglow.org
SPDX-License-Identifier: MIT
"""
from gfhardware.machine import Machine
|
6aa4409d68527e718b37b3531603f6df58f0a5b1 | 7e471dd6d2b4d6a429941ec43c6048397a0b5456 | /Stacks/Next Larger Element.py | 4cc805d76c5a99f29b596d37b6fee74538face40 | [] | no_license | Benson1198/Practice-Problems | ab0c4629e456a990310b2c365401b6b46cd66982 | 505a2d0f4941e564516c9e521178270cdc5c0744 | refs/heads/master | 2022-11-28T18:00:16.714068 | 2020-08-11T17:59:13 | 2020-08-11T17:59:13 | 270,238,012 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,875 | py | Next Larger Element.py | # NOOB
def nextLargerElement(arr,n):
res = [-1]*n
for i in range(n):
for j in range(i,n):
if arr[j] > arr[i]:
res[i] = arr[j]
break
return res
# PRO
def createStack():
stack = []
return stack
def isEmpty(stack):
return len(stack)... |
022b9d0f25adf3ccb0cc7da115432532b60953e1 | 077ad9db2accebef32cdc4fe29da25a5c6d1ae86 | /app/cmp_input.py | 5fe5973494a76eec0478a595e36aae3ecf0e0208 | [] | no_license | DeniZka/entity | 066729f31e39eef9876ce69a42715aaffc97179a | d72761dc3ad1df148aaf4c07d286d5f44a0927af | refs/heads/master | 2021-07-11T01:42:03.230087 | 2017-10-13T14:55:05 | 2017-10-13T14:55:05 | 104,975,714 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 313 | py | cmp_input.py | from app.cmp import Component
class Input(Component):
inp_grps = 2
inps = { # active keys
'throttle': {},
'prop_brk': {},
'prop_lft': {},
'prop_rgh': {},
'fire': {}
}
def __init__(self, group):
self.group = group #for example two players on pc
|
fed93a4d7826afd617774d8f20ef643c13899c68 | 316dd7e4fffc0eefacba73d0d7cd4c0b63ab9fa0 | /chapter13/addingLineAndPageBreaks.py | fd8d11644dce1654d341520a1323102163cb8554 | [] | no_license | legendbabs/Automate-The-Boring-stuff | 3775c4a3226f4697e9b204bbfafec09630231d1e | 7fc37845d21b40f17014879581a6bc108b156c95 | refs/heads/master | 2023-01-22T13:18:07.348011 | 2020-11-30T18:40:32 | 2020-11-30T18:40:32 | 317,311,883 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py | addingLineAndPageBreaks.py | import docx
doc = docx.Document()
doc.add_paragraph('This is on the first page!')
doc.paragraphs[0].runs[0].add_break(docx.text.WD_BREAK.PAGE)
doc.add_paragraph('This is on the second page!')
doc.save(twoPages.docx)
|
33e1761cd4f1da48fbebdb361a035884acd8f138 | d260d443eb5af3282b3c2b2908bbc53a08178253 | /second/pytorch/torch_to_onnx.py | 8702a1f24f003b3cffba093cb8fb5f359853ceb7 | [
"MIT"
] | permissive | lpj0822/pointpillars_train | af498ea37c6a4c325ececc962b5f36d52e70944b | 43594b50fcb5124ab449f1596ab2a9713de18051 | refs/heads/master | 2022-11-27T13:08:17.870024 | 2020-08-06T03:34:25 | 2020-08-06T03:34:25 | 285,464,337 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,866 | py | torch_to_onnx.py | import os.path
import torch
from torch import onnx
import torchplus
# # Override Upsample's ONNX export until new opset is supported
# @torch.onnx.symbolic.parse_args('v', 'is')
# def upsample_nearest2d(g, input, output_size):
# height_scale = float(output_size[-2]) / input.type().sizes()[-2]
# width_scale = ... |
d9517c14c08c58ff85254f5c4fbce4a83e51f15a | 31b2db56b5da15cd631ac922b07cbb01a5b4cd03 | /cart/urls.py | 0dbca4a5ebb7ba763cea5337e73f6c327b0da533 | [] | no_license | fatemehkarimi/ecommerce_store | 3c441400695333a882736e40ce791fb7fb73d459 | dfd1dda00dd760cab1f365f3c7e16915d280ee36 | refs/heads/master | 2023-02-22T22:42:35.955195 | 2021-06-05T10:12:59 | 2021-06-05T10:12:59 | 244,185,733 | 8 | 8 | null | 2023-02-10T23:21:13 | 2020-03-01T16:42:16 | Python | UTF-8 | Python | false | false | 556 | py | urls.py | from django.urls import path
from .views import (
CartListView,
AddItemToCartView,
RemoveItemFromCart,
ShippingAddresses,
charge
)
urlpatterns = [
path('cart/', CartListView.as_view(), name='view_cart'),
path('shipping/info/', ShippingAddresses.as_view(), name='shipping_info'),
path('a... |
844d6266f31747c0c2b2c2d6a5408b0131779f2c | cf862577b08aaa31588a6e27cbd68b578880550c | /Algorithm/Sangjun/3077.py | e46f733e85a18725469369ea45cf7b513977b792 | [] | no_license | raki-1203/Boostcamp_2st_Hot6 | 505a820c0060adab515b9fde41b916ef13a1b9b0 | b71e28b4d5f40cf2268c93ac64570473bdb25049 | refs/heads/main | 2023-07-24T12:44:00.737622 | 2021-09-06T15:53:19 | 2021-09-06T15:53:19 | 392,248,466 | 0 | 0 | null | 2021-08-03T08:39:20 | 2021-08-03T08:39:20 | null | UTF-8 | Python | false | false | 676 | py | 3077.py | from sys import stdin
war_num = int(stdin.readline())
answer1_list = stdin.readline().split()
answer2_list = stdin.readline().split()
# 현우 답에 대한 인덱스 알기위한 dict
idx_dict = {x:y for y, x in enumerate(answer2_list)}
total = war_num * (war_num - 1) // 2
score = total
# 실제 답을 순서에 맞게 모두 탐색
for i in range(war_num):
for ... |
07757354d54b73f4882de621dbc9142fe8c3787c | 390532540c5dd17e2ec84c8b7ad7c34de052936c | /new_app/migrations/0006_element_available.py | 5ecc3febe2665f61f2594e041980b3c8b2e73179 | [] | no_license | Stanisz15/bin_packing_problem | 7db23c3accb53ea31c93a69852f792f455bf0c5d | f04a16e1eb79c4cc2a90933d8622bb1d00053365 | refs/heads/master | 2021-04-09T17:55:53.993685 | 2018-04-09T05:46:22 | 2018-04-09T05:46:22 | 125,882,398 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 390 | py | 0006_element_available.py | # Generated by Django 2.0.2 on 2018-03-22 15:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('new_app', '0005_auto_20180322_0957'),
]
operations = [
migrations.AddField(
model_name='element',
name='available',
... |
b28f0bc9de78816ecffc1dc41b321fa1bd0f6e73 | 6408ea4717b53904302be45cf8de36528291aea5 | /PingPong.py | b107959a92a5901773496c87fce1b04a5090e275 | [] | no_license | LeilaelRico/semanaTec-herramientasC-arteProgra | 92128df2ade7d2b2bfac2f8d459009d0d53ca43e | e8c6cbbef59b19e7a4df0f8224104207f04a2545 | refs/heads/main | 2023-08-31T10:28:31.714821 | 2021-09-17T16:29:37 | 2021-09-17T16:29:37 | 406,430,051 | 0 | 0 | null | 2021-09-17T16:29:38 | 2021-09-14T15:48:00 | Python | UTF-8 | Python | false | false | 5,656 | py | PingPong.py | import turtle
"""
cambiar la aceleracion de la bola
"""
def pong(name1, score_a, name2, score_b):
# Canvas
win = turtle.Screen()
win.title("Pong")
win.bgcolor("black")
win.setup(width=800, height=600)
win.tracer(0)
rootwindow = win.getcanvas().winfo_toplevel()
rootwindow.call('wm', 'a... |
a8839458fc9987e917fd327658394af667567fe2 | b38f409dfcb6c089c7a333d5a362deb4bdeeff51 | /practical2/square.py | d4fecb681591985cb46db399b3ebd3f3bec3a277 | [] | no_license | sacha-cs/roberto | a1aca4503c626887cd9a8b975a342fc267af2bba | e8e3ae6131490fcd87e332d4e2d4b488075d5faa | refs/heads/master | 2021-03-16T05:35:38.746082 | 2016-03-07T23:15:25 | 2016-03-07T23:15:25 | 50,520,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 161 | py | square.py | import robot_utils as ru
ru.start()
ru.move(40)
ru.turnLeft(90)
ru.move(40)
ru.turnLeft(90)
ru.move(40)
ru.turnLeft(90)
ru.move(40)
ru.turnLeft(90)
ru.done()
|
c93809d458c3d0d7a538a5650f082702317fe26d | 794453db3b12579adca0e8f9fb4247437da80842 | /backend/grpc-server/src/meter_usage.py | 8f802a843717b0d58cd974eb4891ffa6479e8b22 | [] | no_license | themreza/grpc-electricity-consumption | 488762f0e2bed77dc5a162b4e92852e6b2ce0f2c | 80206ba7a4bf33b516fc7eb3399f0a5eed6ed799 | refs/heads/main | 2022-12-29T06:06:47.649124 | 2020-10-03T08:27:04 | 2020-10-03T08:27:04 | 300,683,816 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,412 | py | meter_usage.py | from datetime import datetime
from csv import reader
import pytz
import meter_usage_pb2
import meter_usage_pb2_grpc
class MeterUsage(meter_usage_pb2_grpc.MeterUsageServicer):
def __init__(self, csv_file):
self._csv_file = csv_file
def ReadData(self, request, context):
"""
Read the me... |
a4c865b2e1cdf235e3bccac22ebdd7a5ac86039e | f4206ccf7a1f786312627c19f17275c9f63220af | /Agent-Based-Modelling/start_kids.py | 275b21954359c7b07ba79534940d5a5b2437c642 | [] | no_license | neylsoncrepalde/MQ | 29ce39a44f24ea0ae0a38edd85ffae31e3d3ebac | 74e77b133d1237c49a452435ee282778a6d24ba2 | refs/heads/master | 2021-01-17T19:51:31.416932 | 2016-07-29T19:27:26 | 2016-07-29T19:27:26 | 63,714,217 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 582 | py | start_kids.py | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 27 15:51:53 2016
@author: Usuario
"""
#Action
from kids import Kid
def print_possessions(kids):
for kid in kids:
print(kid.balls, end=" ")
print()
names = ['Neylson', 'Bruna', 'Leonardo', 'Mel', 'Raquel', 'Jerônimo', 'Silvio',
'Ela... |
b6719649676c06912246feda59df9125faeb0a07 | 4fe85a4f9c16f93cebbca7da9373a8df262e7569 | /cherrys.py | f557135a596d149edf1c271ae6d6857d0f9d9860 | [] | no_license | 3kwa/cherrys | e5e5e2b7276ac01aac00c79ae56ae329251992c1 | ee5cb702dd57d205aedcbf86fa1b015b3377f712 | refs/heads/master | 2023-02-21T06:27:49.629085 | 2023-02-21T00:05:06 | 2023-02-21T00:05:06 | 2,219,903 | 18 | 9 | null | 2023-02-20T23:36:04 | 2011-08-17T04:50:14 | Python | UTF-8 | Python | false | false | 3,693 | py | cherrys.py | """
Cherrys is a Redis backend for CherryPy sessions.
The redis server must support SETEX https://redis.io/commands/setex.
Relies on redis-py https://github.com/andymccurdy/redis-py.
"""
try:
import cPickle as pickle
except ImportError:
import pickle
import redis
from cherrypy.lib.sessions import Session
R... |
a55c50c9bc44f86b6bb3dc38758e2a199f89c265 | 20627948c9931e71249d4dc8cc2135442d46aa65 | /methods/db.py | 7992f60eb0fd0c906e2c7c4a4b483f8dd2a6a330 | [] | no_license | Rabbits325LK/SmartHome_python | 1f88bc356416538463c82ceca5f778ee63e7a9d4 | b24ee4f47eb0d5e63027ace01fb95f7e6bacb476 | refs/heads/master | 2021-01-10T19:26:39.014091 | 2016-11-08T06:34:16 | 2016-11-08T06:34:16 | 73,136,942 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 172 | py | db.py | #E:\python_workspace\WebPython_Demo1\methods\db.py
# coding=utf-8
import sqlite3
conn = sqlite3.connect('E:\python_workspace\WebPython_Demo1\demo.db')
cur = conn.cursor() |
ce67c7c2333050e6d7b8921d173a1f609d392c6f | 3906210c1d0ae113b0980435322f114b53521e54 | /Completo.py | 70bb2613c20465ca06f3d3ff3cb6251d563bff3b | [] | no_license | Viniciusassissilva/Graph-Course | 989c45f962c36b1f8acd065c57c6617900188e8a | dee2467bd1a9363e7071cc140297da9f9910c13b | refs/heads/main | 2023-06-10T15:13:47.420943 | 2021-07-03T17:24:24 | 2021-07-03T17:24:24 | 382,672,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 462 | py | Completo.py | def completo(M):
for x in range(len(M)):
for j in range(len(M)):
if x == j:
if M[x][j] != 0:
return False
if x != j:
if M[x][j] == 0:
return False
return True
M = [[0, 1, 1], [1, 0, 1], [1, 1,... |
8cb6955c9f8462b72e630996b880cb0617d572c5 | f14db1a3be8b347c25768ed5478b673eb01b728e | /nn_from_scratch/trainer.py | aa44c8cd10846e256958c2868e0bec0119e8235e | [] | no_license | swufung/CSCI499F21_src | 383692c16d3ed522342cfc62ebbee7fae1fc8c6e | 9cc03f6ce137cc67db278bd61d731b8c1b53c8b5 | refs/heads/main | 2023-08-29T17:06:20.392847 | 2021-11-02T21:11:59 | 2021-11-02T21:11:59 | 424,001,450 | 0 | 0 | null | 2021-11-02T21:16:28 | 2021-11-02T21:16:28 | null | UTF-8 | Python | false | false | 1,450 | py | trainer.py | import model_fc
import torch
import torch.nn as nn
def train(y, x, weights_list, epochs):
"""A function that trains a network on a dataset."""
for i in range(epochs):
x_hat, z_list = forward(y, weights_list)
backward(y, x, x_hat, z_list, weights_list)
print ("#" + str(i) + " Loss: "
+ str(torch.mea... |
dceb4cd66cecd00830cb671c3d1271c46cfd1923 | f8f410fe50b782406ed0c86a18069804d750003b | /hw4_test.py | ad08690932fdd2b980ad48d7ee8d1b4288d1de8a | [] | no_license | insung151/CTP | b4ec07a2454d7b65d02e344b51a53e3d2393b115 | 63836000af04b19f8cd1de499dcb24a7c6b26d7c | refs/heads/master | 2021-08-30T05:24:59.128437 | 2017-12-16T06:33:15 | 2017-12-16T06:33:15 | 114,430,979 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,722 | py | hw4_test.py | #Jang TaeJun
#ctp17 HW4 test
#Ver.3.5.0
from ctp.hw4_ex1 import is_valid1; from ctp.hw4_ex2 import is_valid2
from ctp.hw4_ex3 import sanitize_and_sort
from ctp.hw4_ex4 import similarity; from ctp.hw4_ex5 import where_you_at
#data
def make_loc(lat, lon, time, name, keys):
dic={'latitude': lat, 'longitude': lon, 't... |
3b7cdcbb1798c63e2aeee4b1dd6a63fa50c75070 | 560270b32dfff36538d801bfb36d9a176731dcc9 | /catalog/core/utils.py | 7f695a4131793e709b3c8e875fc9247d416102bb | [] | no_license | liviocunha/API-wholesale-footwear-catalog | b8012e1b5603ee5c480e1e4bdf01e11b130c7e3a | 0b7b38f309acf66a7f78b45a8577818b23a815e0 | refs/heads/main | 2023-05-14T14:06:18.185492 | 2021-06-10T02:42:07 | 2021-06-10T02:42:07 | 352,221,857 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,407 | py | utils.py | import random
import base64
import requests
import sys
from typing import Dict
from decouple import config
def generate_api_key():
""" Create API Key for using Client """
chars = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
size = 50
api_key = "".join(random.sample(char... |
0d6b901120feddf5d2ee62b71b1490234a4494cf | 4749d3cf395522d90cb74d1842087d2f5671fa87 | /alice/LC010.py | 6c8e603fbc3735928e58f5389ce31ece89ac002d | [] | no_license | AliceTTXu/LeetCode | c1ad763c3fa229362350ce3227498dfb1f022ab0 | ed15eb27936b39980d4cb5fb61cd937ec7ddcb6a | refs/heads/master | 2021-01-23T11:49:49.903285 | 2018-08-03T06:00:16 | 2018-08-03T06:00:16 | 33,470,003 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 468 | py | LC010.py | class Solution(object):
def isMatch(self, s, p):
"""
:type s: str
:type p: str
:rtype: bool
"""
if not p:
return not s
first_is_match = bool(s) and (p[0] == s[0] or p[0] == '.')
if len(p) >= 2 and p[1] == "*":
return ... |
a78de29dae008febc30573582cd2d37461682ec7 | 44a7101ae18c84ffa0e3c674763ba7b500937773 | /root/Desktop/Scripts/eljefe-2.2/cuckoo/lib/hpfeeds.py | a0212eb64251ea2a56aa230306b368f97ad57334 | [] | no_license | Draft2007/Scripts | cbaa66ce0038f3370c42d93da9308cbd69fb701a | 0dcc720a1edc882cfce7498ca9504cd9b12b8a44 | refs/heads/master | 2016-09-05T20:05:46.601503 | 2015-06-23T00:05:02 | 2015-06-23T00:05:02 | 37,945,893 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,213 | py | hpfeeds.py |
import struct
import socket
import hashlib
import logging
from time import sleep
logger = logging.getLogger('pyhpfeeds')
OP_ERROR = 0
OP_INFO = 1
OP_AUTH = 2
OP_PUBLISH = 3
OP_SUBSCRIBE = 4
BUFSIZ = 16384
__all__ = ["new", "FeedException"]
def msghdr(op, data):
return struct.pack('!iB', 5+len(data), op) + data
... |
b749a12612efad6bd50431a2b80ee0cf34fbd263 | 2f5851b6c71c393f4aa4bd9de587bc4450de4a43 | /ironicclient/tests/unit/v1/test_resource_fields.py | 748a7542112fb9691a3e23e7b1f21ab961d79331 | [
"Apache-2.0"
] | permissive | rdo-management/python-ironicclient | efd286b0dffa8433b9b907898c7c19cc683e555b | 05c1d776618682c633095caa6553db3170b28b96 | refs/heads/mgt-master | 2021-01-15T18:58:36.827526 | 2015-04-10T17:17:05 | 2015-04-30T14:21:02 | 30,305,501 | 0 | 1 | Apache-2.0 | 2021-04-15T00:49:17 | 2015-02-04T15:26:42 | Python | UTF-8 | Python | false | false | 1,757 | py | test_resource_fields.py | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Intel Corporation
#
# 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
#
# Unles... |
8ad58466e779bdb774fb5167bbbb077c2d9dc19b | dd3c7a4f063ce42207354545a6d544a77d0f3398 | /NotMagicEightBallModified.py | b8696d8bbff3cee98add388454e4b004d7d9f171 | [] | no_license | ThatCoder23/Coding-Projects- | 16422f3c6412caf3c0941e5c99023f96e069a92a | 87a37f0587a07c1bc3a95a36f1ea13a8ad06ac9e | refs/heads/master | 2020-05-29T09:20:59.891872 | 2019-10-14T21:29:04 | 2019-10-14T21:29:04 | 189,058,981 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,029 | py | NotMagicEightBallModified.py | # Youssef Yatribi
# CSC119.101
# Feb 22, 2018
#
# Magic Eight Ball simulator
#
def getQuestion():
question = input('What is your question?:\n')
print('\nYou ask me ', '"' + question + '". . .')
time.sleep(1)
print('hmmmm ... let me think about that')
time.sleep(2)
if 'Why' in... |
d6e9b2b4c4164c447b2a8f5a56041382c8b1cfe9 | ffe880089362c21b8c5a5c329bfa5cd0f9d254fe | /mysite/views.py | f7d774daa20a9779b576416a53a6d3b41e92aa9b | [] | no_license | Lijiachen1018/Cloudapp | 8f9d9729efd9f8ebe39149496ca8280015480eb5 | 7216eb382b56aec7146fbd104569711d72cbeb2a | refs/heads/master | 2021-09-03T09:07:36.347418 | 2018-01-07T22:52:50 | 2018-01-07T22:52:50 | 115,432,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 264 | py | views.py | from django.shortcuts import render_to_response
from django.shortcuts import render
#from django.http import HttpResponse
def Homepage(request):
return render(request,'Homepage.html')
#def grouplist(req):
# return render_to_response('groupList.html',{}) |
5762d2131c3739eaa4c649ecc58ffc916f045e4d | efbf54a7778aabb8d5b4f494517fb8871b6a5820 | /gnome-base/libgtop/libgtop-2.28.4.py | c455c74f6cbf6be783266f8715d5543d7679f470 | [] | no_license | hadronproject/hadron64 | f2d667ef7b4eab884de31af76e12f3ab03af742d | 491652287d2fb743a2d0f65304b409b70add6e83 | refs/heads/master | 2021-01-18T11:30:37.063105 | 2013-07-14T04:00:23 | 2013-07-14T04:00:23 | 8,419,387 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | libgtop-2.28.4.py | metadata = """
summary @ A library that read information about processes and the running system
homepage @ http://www.gnome.org/
license @ LGPL
src_url @ http://ftp.gnome.org/pub/gnome/sources/$name/2.28/$fullname.tar.bz2
arch @ ~x86_64
"""
depends = """
runtime @ sys-libs/glib x11-libs/libXau sys-apps/texinfo
build @... |
0c0df2614a968d5b9c1e3c33a2eb73fa9596f95e | 4e12bd69124dead063b191661444f08ca60a6b2f | /pyodidewsnet/protocol/connection/socketdata.py | fe2f84ebd287139d880334285de4332c57db0344 | [
"MIT"
] | permissive | skelsec/pyodide-wsnetwork | 8cc2c0f9848ce3c714a8dff9250793acd9d25c76 | 550ad37badf4381a4a61e6453be4816a445da586 | refs/heads/main | 2023-03-11T20:46:40.718600 | 2021-02-28T13:24:21 | 2021-02-28T13:24:21 | 326,666,282 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 705 | py | socketdata.py | import io
from pyodidewsnet.utils.encoder import UniversalEncoder
from pyodidewsnet.protocol.cmdtypes import CMDType
from pyodidewsnet.protocol import CMD
class WSNSocketData(CMD):
def __init__(self, token, data):
self.type = CMDType.SD
self.token = token
self.data = data
@staticmethod
def from_bytes(data)... |
028d726df5befe210dd07eddd7c13a824831ac1b | f0ea8eb7710adf9711ed25d9c9f2ae0206751880 | /pttMapMaker.py | 53622c500a3f4776b68ed3543b8c8f7736d7556e | [] | no_license | BlewEgg/Prime-Ticket-Time | ffc10851b498e67a022da2b1384657e6df477141 | fb73b266a3cf02fd7ff83be0d1ce8d8020a62271 | refs/heads/master | 2021-04-28T08:44:18.489327 | 2018-02-20T21:36:20 | 2018-02-20T21:36:20 | 122,257,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,248 | py | pttMapMaker.py | # Hello
# import curses
# stdscr = curses.initscr()
# LAST UPDATED : 11/30/16
# TO RUN/TEST, IMPORT THEN CALL MAIN()
# Add a "Mode" to the mapMaker
# Return the string or print out in console
class seating():
def __init__(self, initV="Empty"):
self.name = initV
self.cardInfo = in... |
193dd587cc2818191d0ca21f937de66696438dc8 | d4280eca1a9badb0a4ad2aa22598616eedece373 | /PyQt/list3.py | de580b82507c0734678ca4e17bf8f98f76193032 | [] | no_license | Little-Captain/py | 77ec12bb2aaafe9f709a70831266335b03f63663 | 74ba3c3449e7b234a77500a17433e141e68169f7 | refs/heads/master | 2021-06-09T11:33:23.205388 | 2019-11-22T01:17:44 | 2019-11-22T01:17:44 | 131,844,918 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 77 | py | list3.py | names = ['John', 'Kelly', 'Caroline', 'Paula']
for n in names:
print (n)
|
a36741b1e1773cf57e68fa184e348deada654ed0 | 0eda8ff196e13171e0e9ff1b02502168fd0e03cd | /transformers/cluster.py | 5d116d2d4a832487db0346b0eef4dbffdb0d8c02 | [] | no_license | michael-phillips-data/KeyModels | fce8ecb2d624cef033233704186287c22be4dba0 | d1663b8a6b407ca08eeb2505fa4ed4abf8b326a8 | refs/heads/master | 2022-12-10T19:25:50.104492 | 2020-09-09T23:25:37 | 2020-09-09T23:25:37 | 294,251,543 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,580 | py | cluster.py | """
for each era number we want to make a single row with a shit ton of features that describe that era.
then we can cluster on these eras blindly (without looking at targets)
then for each cluster, we have a separate model that only trains on those eras.
then in live, we cluster first, and then pass the results to it'... |
0eb20fbba9b1e574aab321a6598909412109d2cb | 287e985f464bcc9853ea95464cbf29af74e097e5 | /1730-Shortest-Path-To-Get-Food.py | 9d44025ee9e929e5420a6bc84752cf65ada7bebf | [] | no_license | VineetMakharia/LeetCode | cbf957198b14957f304ba1221bf49648d0b49365 | 6a667773552df3cb957b0748042a292016d48e5a | refs/heads/master | 2023-03-03T19:23:03.147969 | 2021-02-05T15:27:37 | 2021-02-05T15:27:37 | 292,960,764 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,282 | py | 1730-Shortest-Path-To-Get-Food.py | from typing import List
from collections import deque
class Solution:
def getFood(self, grid: List[List[str]]) -> int:
# First task is to find my location
rows = len(grid)
cols = len(grid[0])
x = -1
y = -1
for i in range(rows):
for j in range(cols):
... |
db0ee2b67d3a42b98a22d66eff8a15261e28cecd | 8f90ad2d71d3d925348e1e583d682c232c501da2 | /python/tests/test_matching.py | 5abd76643d65182e9217cbe56a44695a65e295bd | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | Yarin78/yal | 580e076b1d57791f3407efc129faa4801bb37902 | 90d3970f45ece3fc655edc371301f42107b10cf2 | refs/heads/master | 2022-12-26T23:55:33.527657 | 2022-12-12T05:36:22 | 2022-12-12T05:36:22 | 230,923,375 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,915 | py | test_matching.py | import sys
import random
from collections import defaultdict
from yal import matching
def test_trivial():
g = {
'FOO' : ['bar'],
'X': ['a', 'b'],
'Y': ['b', 'c'],
'Z': ['c'],
'BLAH': []
}
m = matching.bipartite_matching(g)
# Unique solution
assert(m == {'Z': ... |
9d22a4c331f654b324aa91825e391a8eacba876d | 543a39c8c3aacf76c2ef89ea05129935f18284a5 | /currency_converter.py | adf41c08d2dc089e4aa7dc4cbe243e6ed7b781ae | [] | no_license | JLRA/kiwi_currency_converter | 30d413157cecef3400a6691ed3b3a7097aad2894 | fb9cbbd4e844d67a0048ba37c03e31bc55d2fb23 | refs/heads/master | 2020-03-18T20:10:08.144992 | 2018-05-28T19:34:21 | 2018-05-28T19:34:21 | 135,199,833 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,099 | py | currency_converter.py | #!/usr/bin/python
# -* coding: utf-8 *-*
"""
***********************************************************
* - Script : currency_converter.py *
* - Creation : 2018-05-22 *
* - Version : 0.11_20180527 *
* - Author : Jose Luis Rodrigue... |
13b4ae86fe44ee76a786f4140588e5c2128c7eae | a5c9fb4795e3b13873a4c6c0cb405d641d135fb3 | /first.py | 43e3c4b8d2e407d63723de3cfdf78469c476deae | [] | no_license | Mr1ter/mr1ter | fbc5deb1f82cedf5e3085c5d7c4228780d7fadd2 | 2f4be8c7aab06c1f08991d409a886e540ebc8724 | refs/heads/main | 2023-04-19T01:09:29.927476 | 2021-05-04T17:22:36 | 2021-05-04T17:22:36 | 344,230,475 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,446 | py | first.py | import discord
import random
import json
import asyncio
import os
from discord.ext import commands,tasks
from discord.ext.commands import has_permissions, CheckFailure, Bot
bot = commands.Bot(command_prefix = '!?', help_command=None)
@bot.event
async def on_command_error(ctx, error):
if isinstance(error, commands... |
a50ed8204478abedbe0e98e98f784e96e195d3f0 | 6bf3e60d0aba591ad82b34a05e0ed67d133db797 | /day_4.py | 6a51cb378c841cc188b1adc4a9ab147f826db098 | [] | no_license | PlaviAjvar/AdventOfCode2019 | 94dd8047b38ed51e45b245aef70d683137328bb3 | 75e6f6f4a818faab12cc9b7d8edf0069be3afcc6 | refs/heads/master | 2022-03-23T09:13:53.796759 | 2019-12-25T19:36:30 | 2019-12-25T19:36:30 | 227,382,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,453 | py | day_4.py | def has_same_digit(n):
dig = [False] * 10
while n > 0:
if dig[n % 10] == True:
return True
dig[n % 10] = True
n //= 10
return False
def is_increasing(n):
cur_dig = 10
while n > 0:
if cur_dig < n % 10:
return False
cur_dig = n % 10
... |
b003c84ddb5cae0c92bf5f9e38961196399a10b1 | 2f63688febd21dc3ae6b19abfa79ad313c820154 | /0023_Merge_k_Sorted_Lists/try_4.py | 406b27d876400feff00d3c11c6a758143b2327eb | [] | no_license | novayo/LeetCode | cadd03587ee4ed6e35f60294070165afc1539ac8 | 54d0b3c237e0ffed8782915d6b75b7c6a0fe0de7 | refs/heads/master | 2023-08-14T00:35:15.528520 | 2023-07-30T05:56:05 | 2023-07-30T05:56:05 | 200,248,146 | 8 | 1 | null | 2022-11-19T04:37:54 | 2019-08-02T14:24:19 | Python | UTF-8 | Python | false | false | 1,093 | py | try_4.py | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def mergeKLists(self, lists: List[Optional[ListNode]]) -> Optional[ListNode]:
if not lists:
return None
def merg... |
5722279674eadd2c30696c8d13e696ba768e0398 | 397971a0369458daa71d72de004d5eeb280233cc | /partition list.py | f51e73b5568663ea0792840765617af4cdac203b | [] | no_license | iamshivamgoswami/linked_list | b0996795bd503d26d89d1740ed887c9426196039 | aab2164328392ee47bd32c03d8a7249600de61a6 | refs/heads/main | 2023-06-25T17:51:18.840451 | 2021-07-30T17:36:58 | 2021-07-30T17:36:58 | 391,080,374 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 640 | py | partition list.py | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def partition(self, head: ListNode, x: int) -> ListNode:
dummy = ListNode(-1)
n = dummy # smaller
dummy2 = ListNode(-1)
... |
b9ac0a5b4abe800b85a3740890423f42237ec42f | eb1f648bac293a8ee5338013e31bf0da9c281db4 | /barchartacs/dashapp_csvaccess_app.py | db52dece35d3f56cfc9325fc44f57c8bf633e652 | [] | no_license | bgithub1/barchartacs | 48a1c1d26fbd7c0c98f18d6d90b1d61fc9ff24b0 | 4815fe0fcedad2ab749f309221aca9fe66545711 | refs/heads/master | 2023-05-25T09:15:10.959016 | 2023-05-02T15:39:08 | 2023-05-02T15:39:08 | 196,197,455 | 8 | 2 | null | 2023-05-22T22:40:56 | 2019-07-10T12:01:52 | Jupyter Notebook | UTF-8 | Python | false | false | 274 | py | dashapp_csvaccess_app.py | '''
Created on Aug 9, 2020
@author: bperlman1
'''
from dash_extensions.enrich import Dash
app_port = 8812
url_base_pathname=f'/app{app_port}/'
app = Dash(prevent_initial_callbacks=True,url_base_pathname=url_base_pathname)
app.title='db_table_access'
server = app.server
|
37671eeb35558d9386e951c9640a40a356b9365f | 623ec2dd3bfb2a424f070f0f71544844b99b9119 | /model.py | 486f6c4d5a13c6147bc3db661a648f10be227bd4 | [] | no_license | fuzhongqiang/Simple-Infrared-thermography-pose-prediction | 78461c8d278dbd3cedcde7abef6f09281a564e3c | 41c66cb8dd81d74063fb9b4ca0341748e2048865 | refs/heads/main | 2023-02-24T23:46:43.371509 | 2021-01-25T03:56:50 | 2021-01-25T03:56:50 | 332,142,789 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,708 | py | model.py | from tensorflow import keras
def build_model():
inputs = keras.Input(shape=(8,23,27,1))
x = keras.layers.Conv3D(64,(3,3,3),padding='same',activation='relu')(inputs)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.Conv3D(64,(3,3,3),padding='same',activation='relu')(x)
x = keras.... |
e7b879d233c15d477e23a70ff8fd230729ae5ede | 85521c8e33b4ef4f5d554ccb69650db48bd42022 | /network/message.py | 6d78f2839bb05efd7ec50ac765f5e2f80966941d | [] | no_license | lihaibo3653/python-d-class-1 | 5e069c5b5117d0bfa1c51fbc16cbd2ca107c46d3 | f10f6fa8f946179850bbfa0e0e2c07925604f39a | refs/heads/master | 2020-04-17T08:10:18.125547 | 2019-02-26T12:24:11 | 2019-02-26T12:24:11 | 166,401,074 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,574 | py | message.py | import socket,json,struct
#发送聊天信息
def send_heartbeat(s:socket.socket,time):
send_object = dict()
send_object['a'] = 'heartbeat'
send_object['time'] = time
send_data = json.dumps(send_object)
print('发送的消息:',send_object)
send_data = send_data.encode('utf-8')
send_pack(s,send_data)
def send... |
714fbd94f8bdb6233eec68555d0e5636c0b898cf | b4425994bf1d79ddb82ea9c818519fa755c93df6 | /main_app/migrations/0001_initial.py | c511983e6bfb16068682b488f2d95e6ce6db292e | [] | no_license | jedgodsey/slumsofJSON | ce7e1777d5e1414529d343285bf4b40c50439be4 | 96355682a16b6806d3b42d2d00429b2fa6ca81ca | refs/heads/main | 2023-02-28T02:18:57.794641 | 2021-02-09T06:45:35 | 2021-02-09T06:45:35 | 330,581,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,675 | py | 0001_initial.py | # Generated by Django 3.1.5 on 2021-01-29 23:27
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Profile',
fields=[
... |