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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5ff49af7835aec6b9152c2db77143b493dc932fa | 3434db5e625f7454a9bf3fb59e791b4549a78a63 | /api/data_user_request.py | eb8ca4a711e0a6143f7c6c095369fcf7d525cd12 | [] | no_license | cuybot-company/cuybot-discord | ff8aaeaa1009036716bbe0884898e14b0e720557 | 9358ffdbb873b69c1240dab225c178702e159e44 | refs/heads/dev | 2023-09-02T22:17:19.424528 | 2021-11-06T08:45:26 | 2021-11-06T08:45:26 | 414,055,006 | 10 | 7 | null | 2021-11-06T08:45:27 | 2021-10-06T03:25:13 | CSS | UTF-8 | Python | false | false | 2,145 | py | data_user_request.py | import gspread
import datetime
time = datetime.datetime.now()
# name_exel = 'cuybot-discord-request'
name_exel = 'cuybot-discord-request'
cloud = gspread.service_account(filename='./config/gkt.json')
excel = cloud.open(name_exel).sheet1
reputation = cloud.open(name_exel).get_worksheet(1) # gspread only implement shee... |
ae73ed867b86e8eef379b40ef5b78614cbac22a8 | a04185896242540f21a77e11046ba3776974da66 | /rushell/auto_completion.py | 25de8d78afdb985c7160630c7a0162179caf63c6 | [] | no_license | thautwarm/rushell | 6961d51cd776efb26116d7179cdbb58366465369 | be78174f4e9f4b01f66460523bb6f8aa79a01047 | refs/heads/master | 2020-12-02T05:56:23.553742 | 2019-12-30T18:29:47 | 2019-12-30T18:29:47 | 230,913,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,284 | py | auto_completion.py | from prompt_toolkit.completion import Completer, Completion, CompleteEvent
from prompt_toolkit.document import Document
from rushell.parser_wrap import parse, ParseError
from rushell.structured import get_current, structure_top, Cmd, Str, Concat
from abc import ABC
from typing import List, Callable, Dict
class Comman... |
849c4632ce509f22475c8a274fe67f7f17fbabea | 59c9fd530aeb948f544f96ab57cae59e21a34dcd | /pythonProject/Lista_01/Algo1_0002.py | ed63cf39b0084f18ddd772aa5b0e7e9ba816343d | [] | no_license | fabriciosept80/algoritmo | 0893866898fc852e66cf151cc87b254d66721242 | 96c98a85131319144dae9f49805717fb6e083f01 | refs/heads/master | 2023-09-03T23:50:25.342294 | 2021-10-20T23:36:01 | 2021-10-20T23:36:01 | 393,407,487 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 281 | py | Algo1_0002.py | # 2- Escreva um programa que leia um valor em metros e o exiba convertido em milímetros
print('*'*80)
print("Conversão de Metros para Milimetros".center(80))
m = float(input("Entre com o valor em metros: "))
print(f"O valor em metros convertido para milimetros é: {m*1000:.2f}") |
a8c77efdc70ab48e5d849c2e22c01dc9449637dd | a3cf239c2cb233dc2940f1db80767fdb966a538e | /speaker/migrations/0004_auto_20191223_1446.py | 38b9b919c875bdbc0c7714712024bd206762fac1 | [] | no_license | skiboorg/streamfest | f346ea13426612bf5feca78c3c63a592228feb27 | c3abbf4e441a619f4e857a1a9e24ab9fe9b749fe | refs/heads/master | 2023-01-14T02:48:46.872538 | 2020-11-14T05:47:45 | 2020-11-14T05:47:45 | 227,119,918 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,656 | py | 0004_auto_20191223_1446.py | # Generated by Django 2.2.7 on 2019-12-23 11:46
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('speaker', '0003_defaultitem_streameritem'),
]
operations = [
migrations.AlterModelOptions(
name... |
822ac00bcc0918b96f15fb02e812b6d3e168b76d | 8a673242299ff864e390c09db0a36c18a60fc9bf | /ProjectInit.py | 9ba056470ac2607f0763a9edf8143b504db8245b | [] | no_license | kzsl1990/Project_Dict | 01f5cef80b0ae729a8d40b2b0856e90beccaedfc | c27188729060612ee4bd3a0712b639dddc219d91 | refs/heads/master | 2020-04-25T07:47:10.234144 | 2019-03-04T10:06:22 | 2019-03-04T10:06:22 | 172,624,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | ProjectInit.py | import LoadDict
import History
import UserData
# LoadDict.loadfromfile()
History.reset_info()
UserData.reset_info()
print('init finished') |
a1e8bb23b2a7ee9abd3efd6698edc3cdc9cf2330 | 48cad5d8d4221c8da9c235bc3512eb740cc2d3f3 | /toymc/correlated.py | 3ef009f1ad9bb78828bf94748d5741fe998233b0 | [] | no_license | samkohn/dyb-toymc | 59384960fa49bcd9ccedea6e0926f55dca56f147 | 3bf6eafda44a5df98cec1c438d201aa2fd35a115 | refs/heads/master | 2022-12-02T14:59:33.745751 | 2020-07-24T23:34:46 | 2020-07-24T23:34:46 | 259,547,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,879 | py | correlated.py | """The Correlated event type is a basic but powerful model of
correlated-pair events.
Each event pair is generated independently from other pairs. The
prompt and delayed energies are independent, but the time delay is
sampled from an exponential distribution, and the delayed position is
user-configurable, but defaults... |
7761126ac00c4fc8c84b309b9f8dc45174d9dee2 | 230d8d693de16b24328529b448e5e9a3140de9cf | /rascunho.py | dcc19f9e944f8ff6575e831b31578e2760228a59 | [] | no_license | Gui-go/newPost_fb | c8c0e5d5c117da26617453b330bcbc787ae11561 | d91488d1b6a0d7f2a4fbafef76634e7a2b264a87 | refs/heads/main | 2023-02-02T22:27:03.037226 | 2020-12-18T23:55:31 | 2020-12-18T23:55:31 | 321,462,246 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 89 | py | rascunho.py |
class tt:
def __method1(self):
return "foi"
t1 = tt()
t1._tt__method1() |
9c84975c952b1e70af4c50a10cc4a26fc7e2a5a4 | 708885debe428cc85bbdb45349b408882d2de8d4 | /tests/test_dork_repl.py | 00aa48436ca30e63b867b847ae0aa89693097322 | [
"MIT"
] | permissive | ddejohn/dork | 5acf819c33fa762998428ca6dfc448ddd0ddc2ab | 6ff877c721086c1f1d98a4592b8959ef17cb934e | refs/heads/master | 2020-06-24T21:24:12.433582 | 2019-07-27T01:02:11 | 2019-07-27T01:02:11 | 199,094,851 | 0 | 1 | MIT | 2019-07-27T01:03:42 | 2019-07-27T00:10:41 | Python | UTF-8 | Python | false | false | 3,829 | py | test_dork_repl.py | # -*- coding: utf-8 -*-
"""Basic tests for state and entity relationships in dork"""
from dork import repl, cli, types
# pylint: disable=protected-access
def test_repl_evaluate(game):
"""Dork.repl._evaluate should deal with all input types"""
assert repl._evaluate("", game) == (
'Huh? Can you speak... |
02ba604d62177b615a7e8e03ab8617434386fc3c | d4f959a0bef4b3bbc2d9350af581a1bb1ee8737f | /vl1/datastructures/dictionaries.py | 6b52ab6c248f6f9fc2aaa869d51fbc07936ea0bf | [] | no_license | r0bse/python_VL_snippets | 257f8e5656957be1f20d56de2dfc6019c5001996 | 452bd79941783cd6a7b3c14fe9eb99f7b0d8f0b8 | refs/heads/master | 2023-02-08T06:34:10.947912 | 2023-01-27T14:10:54 | 2023-01-27T14:10:54 | 223,432,814 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 488 | py | dictionaries.py |
empty_dictionary={}
empty_dictionary[0]="any value"
empty_dictionary["0"]=1234 # not a good idea!
empty_dictionary[1]="is allowed"
print(empty_dictionary) # Output: {0: 'any value', '0': 1234, 1: 'is allowed'}
dictionary={"key1":"value1", "key2":"value2"}
print(dictionary) # Output: {'key1': 'value1', 'key2': 'valu... |
c4b55151fd443c298e51bc69be976e09d7d35752 | 62a542d79e3b45079ea10871120fc135dc4712ca | /src/bst/bst.py | d718f388cbe453e922fb23d45869dff147f95485 | [] | no_license | tapankarnik/BST-as-a-Service | 9c0e873b1959df8e1b3fae2627a63ffd90e4cd91 | 08719c8b3ee5c290c18e8353017de1a01b16c88d | refs/heads/master | 2021-06-17T18:48:05.689895 | 2019-09-16T10:07:31 | 2019-09-16T10:07:31 | 185,449,537 | 0 | 0 | null | 2021-03-20T01:41:32 | 2019-05-07T17:34:22 | Python | UTF-8 | Python | false | false | 5,561 | py | bst.py | class Node:
"""
This class defines a node.
Attributes:
left (Node): Left child.
right (Node): Right child.
"""
def __init__(self, key):
self.left = None
self.right = None
self.val = key
class BST:
"""
This is a class for a Binary Search Tre... |
ef2b1be7202f8dff565fa38bb182d90383ab300c | 57dd6f085ad5fbefa50b6e13e30e1c8bc80f6623 | /baizhan/tank03DisplayRestTanKNumber.py | 644423f90373ddde41410edcba43bac764be0ec9 | [] | no_license | luomeng007/TankWar | d23ef3cd787d3dc152c2dafa0b8d1acc8ff6622f | b88900b70e117eb4967d23534ef907a56db47340 | refs/heads/master | 2021-07-09T18:27:50.718062 | 2020-10-08T15:37:42 | 2020-10-08T15:37:42 | 205,290,448 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,347 | py | tank03DisplayRestTanKNumber.py | #-*-coding:utf-8-*-
import pygame
_display = pygame.display
# define red in advance, then we could use COlOR_RED represent RGB red
COLOR_RED = pygame.Color(255,0,0)
class MainGame():
__SCREEN_WIDTH = 600
__SCREEN_HEIGHT = 400
window = None
P1_TANK = None
def startGame(self):
... |
8a2ec7d495195323d05791caaffbaa8a184ba1aa | 1c099518cfa5843928763854e6c231d435fc25f4 | /general/WeightDeterminator.py | 106820764cb67b07d40d69153f8f0781866acbcf | [] | no_license | poke53280/ml_mercari | b3cdda6d53fc4e0f2fca93d9a0ea0231f205ad69 | f01ff6c1ca3f341e57c769e06abb136a044c9f74 | refs/heads/master | 2021-06-02T06:21:57.211262 | 2020-10-11T12:08:58 | 2020-10-11T12:08:58 | 114,643,388 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,813 | py | WeightDeterminator.py |
# Linear regression function
#
# Driver further below.
import numpy as np
from scipy.optimize import minimize
from sklearn.metrics import mean_absolute_error
def mae_func(weights, predictions, y_true):
sum = 0
for i in range(len(predictions)):
sum += weights[i] * np.array(predictions[i])
er... |
fc63db269baaa30071f8c89d6598cb6e37a8b3e8 | 65405565edb1c66e35c1697d26ca4ca4cf441f89 | /python/long_run_risk/src/ssy_discretized_test.py | 25504335cecb45c302f5bd46f5f7da9bbc786a09 | [] | no_license | JiaziChen111/recursive_utility_code | 1f3b10aebd16952f04b21b3716f6d23fe53d3685 | 03ca25a6cd1f9f0e2a98a4a672345eb2f0e9a988 | refs/heads/master | 2021-05-23T10:49:10.230358 | 2019-12-29T17:27:35 | 2019-12-29T17:27:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,491 | py | ssy_discretized_test.py | """
Calculate stability test value Lambda via discretization.
Step one is discreization of the consumption process in Schorfheide, Song and
Yaron, where log consumption growth g is given by
g = μ + z + σ_c η'
z' = ρ z + sqrt(1 - ρ^2) σ_z e'
σ_z = ϕ_z σ_bar exp(h_z)
σ_c = ϕ_c σ_bar exp(h_c)
h_... |
f1791f7eb210936bc62ee6008ed9cc8690090136 | ee643df06b8432c06a9961f439133e01da2bbb4e | /main.py | fd4d92463e04db3478fe37b191107c324f9c7260 | [] | no_license | WilyBit/Wily-s-Calc-1.0 | 15b5e916b8cbe6c90b369414a32616982bd8b07c | 91ac6ab3baaba2ad54fc27a896f8ffa968ae0363 | refs/heads/master | 2021-02-18T19:05:23.986275 | 2020-03-05T17:22:30 | 2020-03-05T17:22:30 | 245,225,147 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,408 | py | main.py | import time
def addition():
N1 = int(input("Number 1 : "))
N2 = int(input("Number 2 : "))
return N1+N2
def subtraction():
N1 = int(input("Number 1 : "))
N2 = int(input("Number 2 : "))
return N1-N2
def division():
N1 = int(input("Number 1 : "))
N2 = int(input("Number 2 : "))
return N1/N2
def Multiplic... |
30d97609c31cbbf2b8db1ebfe00070ed81091589 | fee4b06e275bcdfd662fa11452bb47835f0106bd | /backend/backend/tests/__init__.py | 01ad84062aceabd740062cdb256d15c5338b64ff | [] | no_license | aaronleopold/ProductionGraph | 6cdbda031e2056c42ab6dda6d14a4467645b6da1 | d43ff4e1df2e53a4de00d9893413679b1714946f | refs/heads/master | 2022-11-26T02:45:32.953018 | 2020-08-02T19:32:21 | 2020-08-02T19:32:21 | 268,681,273 | 0 | 0 | null | 2020-06-02T02:23:56 | 2020-06-02T02:23:55 | null | UTF-8 | Python | false | false | 32 | py | __init__.py | #init files for Django unittests |
86bb24a7de8c716cbb5e167b8b4c503684366e74 | 203282a1919871b7a39882d349205033c16c19e0 | /itm_quadrotor_node_old/itm_nonlinear_mpc/scripts/non_ros_casadi/pure_pysindy_test.py | 1fca89c4cb3b3192fd8627bdeff62d8d2c5f5356 | [] | no_license | FanJing1112/MA_Experiment | da5a40e584038009310cff548d4ef6b95050a1ae | 2b1e6c6caf61776eb354b92cd6fc6621f9d93752 | refs/heads/main | 2023-08-15T01:16:02.513069 | 2021-10-05T14:47:54 | 2021-10-05T14:47:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,240 | py | pure_pysindy_test.py | #!/usr/bin/
# -*- coding: utf-8 -*-
import numpy as np
import pysindy as ps
import matplotlib.pyplot as plt
import time
# original model
def model(t):
return None
if __name__ == "__main__":
t = np.linspace(0, 3, 30)
x_org = 4 + 3 * np.cos(t) # x_dot = -3* np.sin(t)
y_org = 2 - 2 * np.sin(t)
mod... |
7d7846d1a047014212be4fa6cc71b3e49c94002d | ab0d2b5f8258cbe306e29c5c2a2aae2d3759928f | /getImage.py | 95518031046cdf86c7731a95aea751c8449b0b20 | [] | no_license | iliayar/EdvedBot | 42f4536a336b182181e269dbbfc361db5d667e61 | 2467e41d058d0193b5f3c831f98a94de5cc8e3b0 | refs/heads/master | 2021-01-04T15:05:37.251978 | 2020-02-14T23:35:14 | 2020-02-14T23:35:14 | 240,604,244 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 54 | py | getImage.py |
def getImage():
return open('img.png','rb')
|
34b65ee18cc5f607de4afa94a636de4539ee13bf | d405078ec51a658c426f977af405136f3660ee1f | /mathg2c/distanceSuite.py | ca5f74a7f2419bc3bba01ec376e0750d330d4fe2 | [] | no_license | ESteelEx/gcode2cutsim | ad7f4df5bb4ddfc97cfe11962206737c92607811 | 95aa5678ec3848954cd855838198d3c5a8802a51 | refs/heads/master | 2021-01-25T14:56:46.214393 | 2017-05-23T19:38:55 | 2017-05-23T19:38:55 | 49,667,132 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | distanceSuite.py | import math
class distanceSuite():
def __init__(self):
self.unit = 'mm'
# ------------------------------------------------------------------------------------------------------------------
def get_distance_between_points(self, p1, p2):
distance = math.sqrt(math.pow((float(p1[0]) - float(p2... |
6968ef07c4df300d946a5ebac0e2446eb069cc3d | 6cb45c5f251a3279919c411567f9a3f91d282ef3 | /schrodingerpattern.py | db781678369b1155e90484e68d864fb797e7c8ac | [] | no_license | webclinic017/Growth-Investing- | 319ab50bfcb38d90eb9f4ea6056aed956bf067ee | c06f18277395ec51aac1347985971b044c4b52b1 | refs/heads/master | 2023-01-12T18:52:54.455522 | 2020-10-28T04:55:15 | 2020-10-28T04:55:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 891 | py | schrodingerpattern.py | import csv
def is_bullish_candlestick(candle):
return candle['Close'] > candle['Open']
def is_bearish_candlestick(candle):
return candle['Close'] < candle['Open']
def is_bullish_engulfing(candles, index):
current_day = candles[index]
previous_day = candles[index-1]
if is_bearish_candlestick(... |
fe97a404eb9eb1a4e095ed7e83eebc976b0f4236 | 8e9ea4e7300a51ad3251526e5a1dfdcef7e9bff5 | /Tasks/Pozdnyakov/PyTasks/HW1/18.py | 390f536e7d1e20e72a54b6f20da30a64b1f408aa | [] | no_license | BlackenedJustice/testRepo | 2baff560ed2d9d7de38bb1a0f813ac044c2bf217 | 81fa3893bfd4bba61d81928528b48255aaafdd33 | refs/heads/master | 2020-05-19T17:42:58.062510 | 2019-07-15T07:30:26 | 2019-07-15T07:30:26 | 185,140,879 | 6 | 30 | null | 2019-08-03T10:52:56 | 2019-05-06T06:58:20 | Python | UTF-8 | Python | false | false | 94 | py | 18.py | def fact(n):
for i in range(1,n):
n*=i
return max(1,n)
n=int(input())
print(fact(n))
|
756878ea15bd523f1b411432ff1237d3b867b67e | 88f0bc53072f3ff138a8ee81853fec2e8ff03a84 | /cell_track/tools/__init__.py | 869d3ec6492787063d66dd7afe635840e1345a83 | [
"Apache-2.0"
] | permissive | nimne/acit | e54060bf22f446b2a9d4416c11d5d90f354fbcc8 | 1a62cc479a64a25da2be6c288a3bfee771fb4967 | refs/heads/master | 2022-11-08T12:10:45.283481 | 2020-06-18T18:54:33 | 2020-06-18T18:54:33 | 217,451,024 | 0 | 0 | Apache-2.0 | 2020-04-24T22:32:28 | 2019-10-25T04:30:36 | Python | UTF-8 | Python | false | false | 826 | py | __init__.py | def get_session():
"""
Gets the modified tensorflow session.
Returns:
tensorflow.Session
"""
import tensorflow as tf
config = tf.compat.v1.ConfigProto()
config.gpu_options.allow_growth = True
return tf.compat.v1.Session(config=config)
def safe_load_model(model_path):
"""
... |
8cdb258e5386cadbe39235c07928528939f30f31 | c5d88856d0f696455841fc349d1951f9f084fcb4 | /paktify.py | 8b122e03dfc9655e1c4a30a4ca0e7afd2d954c85 | [
"MIT",
"CC-BY-SA-4.0"
] | permissive | zetaPRIME/sb.StardustSuite | eef6baf46ffdfbfafc9ee18c659ab3b156873db5 | c5413957b4700142dd42a9741e9bc815682c9aaa | refs/heads/master | 2022-09-11T12:09:42.126351 | 2022-09-01T20:46:02 | 2022-09-01T20:46:02 | 67,559,791 | 37 | 14 | MIT | 2022-01-24T01:58:19 | 2016-09-07T01:16:34 | Lua | UTF-8 | Python | false | false | 1,509 | py | paktify.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Paktify: fixes .pak file order to ensure .patch files are listed last
# requires: https://github.com/blixt/py-starbound/
import mmap
import optparse
import os
import sys
import starbound
from starbound import sbon
def main():
p = optparse.OptionParser('Usage: %pro... |
04418a0b9da6623124a250e7c127817b9c0898d2 | a98eef7a435c523b07f917f1763b139fed25bc3d | /leetcode/maxProfit0.py | fef83495aa8399e64579493f122f897a44444e8c | [] | no_license | TangDL/python100days | 04439c8b52088ac5a84835dada8c34368aff4b1a | 10b30b71dbd08ab854b1696b94c71c593fe55cc9 | refs/heads/master | 2022-12-18T18:26:42.132765 | 2020-09-23T07:37:21 | 2020-09-23T07:37:21 | 297,890,537 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 343 | py | maxProfit0.py | from typing import List
class Solution:
def maxProfit(self, prices: List[int]) -> int:
n = len(prices)
if n <= 0: return 0
lowest = prices[0]
res = 0
for i in range(1, n):
if prices[i] < lowest: lowest = prices[i]
else: res = max(prices[i] - lowest, r... |
e3f72d46dcee56022822b5f912a90130807390af | c9035b4e9cc863f970f9ef0d3ed7e013ed62fd7f | /data_process/resize_db.py | 7c446576680ce130b100f59363f0b5091ffdf155 | [
"Apache-2.0"
] | permissive | GioPais/ttfnet | bc680bcc10708c82ab8c79e6fe6ac4ff7c11f518 | 9be8045cfd15957bcb205532bdd6b277725ee8ea | refs/heads/master | 2020-09-12T05:32:32.291754 | 2019-11-18T04:49:37 | 2019-11-18T04:49:37 | 222,326,003 | 0 | 0 | Apache-2.0 | 2019-11-17T23:20:53 | 2019-11-17T23:20:53 | null | UTF-8 | Python | false | false | 700 | py | resize_db.py | import cv2
import os
SRC_PATH = './UChile_db_pascal_v0/Images'
DST_PATH = './UChile_db_pascal_v0/New'
images = os.listdir(SRC_PATH)
#print(images)
img0 = cv2.imread(SRC_PATH+'/'+images[0])
print('Shape: {}'.format(img0.shape))
h,w,channels = img0.shape
if w > h:
new_w, new_h = 640, 480
else:
new_w, new_h = 480... |
ef67ff2616f11a949571c3664133898cee7b4400 | df250a3b3cbd73368acb53211ca614eeb4572d62 | /src.v1 (django)/migrations/0018_auto_20170326_1938.py | d1915449065fc876b144999d900d07ad7b3b09a6 | [] | no_license | michaeldonnelly/cbtracker | 33d1b3ef5059091de23c4e1ddafc5be40d829bc7 | 41e4845e81aa9cd487700730b90d99ff21682cbc | refs/heads/master | 2023-06-26T03:18:09.259896 | 2021-07-28T19:53:20 | 2021-07-28T19:53:20 | 40,195,324 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 804 | py | 0018_auto_20170326_1938.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cbtracker', '0017_series_tags'),
]
operations = [
migrations.RemoveField(
model_name='issuetag',
nam... |
d46cc44049ce79f647e3f2e7a50b4cc4f8ac86d0 | c4c251dc2e02e7e0b3094ac7a588b0de94dd97fd | /onda_fun.py | 60a365722d64ff232917f2efb85874441638a649 | [] | no_license | 7818207/GeneticTrader | 764d1dc1d8eb2a990b1c9568c3687f0e84120273 | e2d426e1cf0f96c46338ba187d22d2c96273408e | refs/heads/master | 2021-10-25T14:45:58.624790 | 2019-04-04T19:52:14 | 2019-04-04T19:52:14 | 179,564,228 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 413 | py | onda_fun.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 14 10:29:21 2019
@author: james
"""
import requests
#a5b72e26f74b956c0768edf23b8064e5-5ebe088b151f7beea5b258a086222662
auth_token='a5b72e26f74b956c0768edf23b8064e5-5ebe088b151f7beea5b258a086222662'
hed = {'Authorization': 'Bearer ' + auth_token}
... |
abd94e068312299882c66ec141627a49f9e57617 | 6ad07bc34e8ee116baf1de4b9b0a1a3a5ef9021d | /tracker/admin.py | 2c97dc78090d4971788a66874b9e2501e1e83e5c | [] | no_license | Mabubakr86/MyWell | accc2a95207f369162f871804ce1bb788b5fcf03 | 4880d7421b720d39e8e3f0e2a9e950f889272452 | refs/heads/main | 2023-01-05T03:39:42.398200 | 2020-10-13T21:59:30 | 2020-10-13T21:59:30 | 303,837,730 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 135 | py | admin.py | from django.contrib import admin
from .models import *
admin.site.register(Field)
admin.site.register(Well)
admin.site.register(Event) |
6b91a02f1da29d910218f43a5458c97ece08899f | eaaa7ed2407e5e97084593eeac00cd012e5bca7d | /main.py | a3da3e8bbb0eefadfdbb0d48e8e910bedf66a874 | [] | no_license | 5l1v3r1/comp100-2021f-ps0-fvrkn | fab935c2a8edbc44be9cd815fc2323aa45b8fca0 | 5048281fe7d437bf1859ff385eaa837f73fb6f5d | refs/heads/master | 2023-08-10T22:42:27.112621 | 2021-10-03T18:04:45 | 2021-10-03T18:04:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | main.py | import math
input_one = int(input("Please enter a number X:"))
input_two = int(input("Please enter a number Y:"))
print(f"Number X, Raised to the power Y is: {input_one ** input_two}")
print(f"Log (base 2) of X is: {math.log(input_one, 2)}")
print("Student Number: 80460") |
37b8046de260b7d360adf229fa9af09115e177af | 5a99ce8cc898daf28502851a2f55358be15ab136 | /epipolar_correlations.py | 8d02ffbb05ecb15a6a468dc1329433bd8f7e8565 | [] | no_license | BradleyBrown19/structure_from_motion | 39af9f3b12beac6ce4a02088968e0716d75c6b63 | b1e2a64b2fd3932958f5a31e78d810d44e06bf04 | refs/heads/master | 2022-12-21T22:26:18.700830 | 2020-09-07T18:31:52 | 2020-09-07T18:31:52 | 293,603,732 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,378 | py | epipolar_correlations.py | """%% EstimateFundamentalMatrix
% Estimate the fundamental matrix from two image point correspondences
% Inputs:
% x1 - size (N x 2) matrix of points in image 1
% x2 - size (N x 2) matrix of points in image 2, each row corresponding
% to x1
% Output:
% F - size (3 x 3) fundamental matrix with rank 2""... |
0951134e7932b113a7c2b882e8c9d0cc4cfa5a8a | c4e2b1a8e0f71c87a3fcc501c4aa4cfa0b8dcfcf | /gamehouse_math/class_5/01_basics/05_jump.py | 5a3461f42d2590faedd6ba6232cdf4fe2da007bc | [] | no_license | davidbp/my_own_notes | c635bc3617e1cf81efa1283ad03b531b4d9a041a | abef039a587b8aa470929dde43744cd562eadf94 | refs/heads/master | 2021-03-27T08:46:54.833976 | 2020-03-11T08:28:54 | 2020-03-11T08:28:54 | 114,556,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,843 | py | 05_jump.py | """
Notice pygame takes (0,0) to be the top left position of a window
TL = (0,0)
TR = (0,500)
BL = (500,0)
BR = (500,500)
TL --------------TR
| |
| |
| |
| |
| |
| |
| ... |
041fe722c4b67b8fea73c66b776efe263af31b14 | 4a9d85d42bb17e83cf076aa5aba8dff228005093 | /gold_coin/coin_info/serializers.py | 2bf4b19bdc614e3e05ac62c10500cd50f004648f | [] | no_license | MyWishPlatform/ducatus_gold_coin | 92724d8dbeae88ff2d9714ce0d59b10f0319eb08 | e4b28fbb9d0725d4b21097352d2905347053cd2b | refs/heads/master | 2022-12-15T13:24:12.396288 | 2020-04-28T14:50:24 | 2020-04-28T14:50:24 | 251,587,162 | 0 | 0 | null | 2022-12-08T03:56:32 | 2020-03-31T11:47:40 | Python | UTF-8 | Python | false | false | 2,133 | py | serializers.py | from rest_framework import serializers
from rest_framework.exceptions import PermissionDenied, ValidationError, NotFound
from gold_coin.coin_info.models import TokenInfo
from gold_coin.transfer.models import DucatusTransfer, ErcTransfer
from gold_coin.consts import DUC_USD_RATE
class DucatusTransferSerializer(serial... |
0e785b44e4b7025336e843d5160d1a8556f1bf8e | 6f0df3e9414a753fef8b52e5e4d4de1d6a53e6d7 | /foto_filter.py | 4e2e0f6a797be6120c52c6a643d37576b2242b52 | [] | no_license | Abdulrauf-alhariri/advanced_level | 1ffefa5a215e60efa06e203a6a85844b773a433d | 323e363bc75f4bbac03c5105ccfff2ce8718099a | refs/heads/main | 2023-05-12T02:34:54.008064 | 2021-06-06T12:44:30 | 2021-06-06T12:44:30 | 329,914,290 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,505 | py | foto_filter.py | from PIL import Image
import numpy as np
import math
import time
# Here we will the the main menue and the filter menue
class Meny:
def __init__(self):
self.status = None
self.image = None
self.filter = Filters()
# Creating the main menue
def huvud_meny(self):
... |
7481f017067f67e6c5de9bd4fc1d2f8b5d23d31c | 61cf43fb0def489469023e55fab05e0d3c96668d | /tutoringapp/tmsutil/__init__.py | 2f17967e80a58072497b2414a76f79f7986153ca | [] | no_license | akhaku/lcstutoring | fd23a56f95cbab446fadc454deb20c095dbe5525 | 925eb6f89cc69733d05a14d05654ad9725b7eea7 | refs/heads/master | 2018-12-28T05:27:22.139803 | 2013-01-17T05:57:40 | 2013-01-17T05:57:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,156 | py | __init__.py | from django.conf import settings
from django.contrib.auth.models import User
from django.core.mail import EmailMessage
from match.models import Match
from response.models import Response
from tutees.models import Tutee
from tutors.models import Tutor
""" Utility methods
"""
def model_to_key(model):
""" Serialize a ... |
93a431278b934d747bac64ebea36869de377e78d | 7426b0e0e3c009e6aeb349229143285e2a1d1610 | /ff.py | 611f8069a271bea301e00338f87c4550dda4830e | [] | no_license | alimaxali/fac | 5700f2a13e362f70a8fedfd65edeb936240586a9 | f5b69520c11949db91da8874f2fe49cdb1538d77 | refs/heads/master | 2020-07-01T09:14:27.117547 | 2020-03-02T22:04:08 | 2020-03-02T22:04:08 | 201,122,869 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,760 | py | ff.py | g='\033[1;32m'
p='\033[1;35m'
c='\033[1;36m'
green='\033[1;32m'
red='\033[1;31m'
yellow='\033[1;33m'
blue='\033[1;34m'
purple='\033[1;35m'
reset='\033[0m'
y='\033[1;33m'
from os import system as gg
import time
sb = input("passwoed ")
if sb == "999":
f = open("max.txt", "r")
for i in f:
print (g + "good" + c + "---... |
07c528b9b1be5912741688443ed04c6812923641 | 127b867fd0949f3cea0016137a7ca04166982990 | /ablog/admin.py | 52cb5cacbbfb3270d35c9a87d6ff907f5eeb87b6 | [] | no_license | Akkutabusova/ptpsite | 9dedd64e94eafa8dc84e6a0fd10a60c168f4e38f | 4328e817501ea421c3307c6c35a505c6e69ed141 | refs/heads/main | 2023-02-01T12:12:37.380515 | 2020-12-07T17:55:03 | 2020-12-07T17:55:03 | 312,236,052 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | admin.py | from django.contrib import admin
from .models import Post, Category, Comments, Profile
# Register your models here.
admin.site.register(Post)
admin.site.register(Category)
admin.site.register(Comments)
admin.site.register(Profile)
|
6aedb9f767a277868c2b699865493afbe47a6e44 | 24fec131e6386bc7f1cfd690c2558517ca669c42 | /heapsort.py | 6ab3fe025fc3c233afb39608801155709495ecd2 | [] | no_license | mmcgee26/PythonProjects | bf9f6b248c961e15cd57e3e74b4fc48e4ded5467 | 9337c45549e14b9f814d4172130e5aa1f71857fa | refs/heads/master | 2021-05-21T19:10:04.427547 | 2020-04-03T15:07:45 | 2020-04-03T15:07:45 | 252,765,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,231 | py | heapsort.py | def heapify(unsorted, index, heap_size):
largest = index
left_index = 2 * index + 1
right_index = 2 * index + 2
# See if left child is greater than root (if exists)
if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
largest = left_index
# See if right child is... |
b5336ec2cc62814cab40de3ae48155a1c05bdaca | 45908230647ca824bcaadd4e9fb27143f9a56476 | /core/namelist.py | 4cc2b7a71dfeadd573e776dd3770104ba7cd457e | [] | no_license | sully90/seren3 | 482dfb455bde85a80a35d4c9843df8a4f957816a | ba622ae4c62859cab9de40c0fd0c8e503b28e052 | refs/heads/master | 2021-08-08T12:48:44.945093 | 2017-11-10T10:29:55 | 2017-11-10T10:29:55 | 104,355,816 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,480 | py | namelist.py | import numpy as np
def _is_number(str):
'''
Dirty check to support scientific notation
'''
try:
float(str)
return True
except ValueError:
return False
except TypeError:
return False
def load_nml(snapshot):
'''
Read the namelist file
'''
import o... |
1435791d782bdb9b62afb0d011e63602d043dde1 | 2f7d134a4af916789d07699a566bf048817dbf17 | /iPath_UI.py | 7f7fba529879837dd42f9be4e989bbfe00d4e0f3 | [] | no_license | Sapphirine/Enhanced-navigation-system-based-on-real-time-prediction | de972af630d4978e4ef46c5e2171bb91ab80c9d7 | 942874c7faebbbfa46652572cead5866a6a39112 | refs/heads/master | 2021-08-31T14:39:22.382590 | 2017-12-21T18:33:18 | 2017-12-21T18:33:18 | 114,915,429 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,270 | py | iPath_UI.py | # -*- coding: utf-8 -*-
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(QtWidgets.QMainWindow):
def setupUi(self, Form):
Form.setObjectName("iPath")
Form.resize(721, 553)
self.gridLayout_8 = QtWidgets.QGridLayout(Form)
self.gridLayout_8.setObjectName("gridLayou... |
e57e4bea67262555ecfa1e1e47157b6001dd61ee | ba5ef6c719094e17101ed3a3a771a4780cea7295 | /editors/egg.py | bf8835bb07d30095885c2c2bbb69dbd6affce057 | [] | no_license | hectorhcuevas/dsp | a9cb5feec3c7c65a656d933df5688eebf1bcc9c4 | fbaec04432cc3576301c34a872a040e21f325bce | refs/heads/master | 2021-01-20T07:05:30.384717 | 2018-01-12T16:20:47 | 2018-01-12T16:20:47 | 89,957,413 | 0 | 0 | null | 2017-05-01T19:51:51 | 2017-05-01T19:51:51 | null | UTF-8 | Python | false | false | 113 | py | egg.py |
print("this file was created using the Vim editor")
print("This file was created by Hector")
:wq
ZZ
":wq"
:wq
|
b0f6e8d26e7fb4d9cffe05164d2084a3e93e6c53 | a8eff7679633dd9d9ab3b7476016f9049f043ea4 | /models/c_notifications.py | b3136e5295b8d5c03a5bd79a32e9cbe1ddb5b9d5 | [
"LicenseRef-scancode-public-domain"
] | permissive | xbrianlee/EventCentral | 4633eadedf9964b6d0415a88ebf1730ee205a2f3 | 776f23132f28460b959c877845fe8d450eb6f8b8 | refs/heads/master | 2020-04-06T06:52:09.247896 | 2014-12-15T01:49:08 | 2014-12-15T01:49:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 529 | py | c_notifications.py | # -*- coding: utf-8 -*-
from datetime import datetime
db.define_table('notifications',
Field('user_to_notify', 'reference auth_user'), # person who should see the notification
Field('description', 'string'), # what the notification should say
Field('time_created', 'date... |
ca8e87faca087c6e067fa331613936c1e8687f47 | e11f99cc2a9c5db14f4303f7e57d4f10e213e035 | /app.py | 08fd336f4ec2ada0124ab79c31b1e69ccee06093 | [] | no_license | nexacenter/eduhack-hub | 52c2c7bf76943c8890cf26cafbbc1db58948c9aa | 98d833c24d157d3d8078974282f9ff7ccd1b3ce2 | refs/heads/master | 2022-05-01T23:13:00.650972 | 2022-03-14T10:41:11 | 2022-03-14T10:41:11 | 172,723,984 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 14,581 | py | app.py | from database import *
import config as CONFIG
import IPython
import logging
import os
import validators
fuck = IPython.embed
from flask import Flask, render_template, request, url_for, redirect, session
import flask
from flask_login import LoginManager, login_user, logout_user, current_user, login_required, UserMixin... |
8fcbfd49d962c2fdfc41bb3c8b81054819b98d12 | d09ba5d50f2ab1cd9deedaf6b236d2bd66d8cfc4 | /reV/utilities/__init__.py | a45f44bf5abb781e3f89cec9ec32093407d8b12d | [
"BSD-3-Clause"
] | permissive | NREL/reV | fbd5545edd456994282af9f813981b3987eba1fd | 497bb7d172197e09a9e14b1b1ca891b8c828b80a | refs/heads/main | 2023-08-19T04:08:48.186365 | 2023-08-14T22:46:13 | 2023-08-14T22:46:13 | 201,343,076 | 53 | 26 | BSD-3-Clause | 2023-09-06T14:50:59 | 2019-08-08T21:54:39 | Python | UTF-8 | Python | false | false | 1,709 | py | __init__.py | # -*- coding: utf-8 -*-
"""
reV utilities.
"""
from enum import Enum
import PySAM
from rex.utilities.loggers import log_versions as rex_log_versions
from reV.version import __version__
class ModuleName(str, Enum):
"""A collection of the module names available in reV.
Each module name should match the name of... |
bee1270757ee718dd272323971eebbc5a92820b5 | b01c580000fe43997b8b5bb236ce1ce581f7f87a | /Part2-SimplestBlockchainEver/block.py | 96be8dce12fc1001ffd4f961590f0877306a62e2 | [] | no_license | wesleyjtann/2018-Fall-Blockchain-Developer-Challenge | 85753e5102d1016f74a9b9df2973fed33769f126 | fc2b11269a0c78e315954a0948dfd9a840540aeb | refs/heads/master | 2020-03-28T03:13:41.253114 | 2018-09-06T06:41:12 | 2018-09-06T06:41:12 | 147,629,006 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 870 | py | block.py | from Crypto.Hash import SHA256 as hashFunction
import datetime as date
class Block:
def __init__(self, transaction=None, value=0, parent_hash=None, height=0):
self.height = height
self.transaction = transaction
self.value = value
self.parent_hash = parent_hash
sel... |
75de33abd552f18cf0d26fe5367ff3f5fab29f7e | 80a0048208f71b652840a4ea24fd787a11f48b80 | /lab9_mandelbrot.py | 6a6c96dfa4e90a52af7b515da80fd8409e0c530f | [] | no_license | samahDD/CS115b---Intro-To-Computer-Science | 95f9ca4dfa802db2cfb228ff1365c07800a80d36 | 51d49385fdf612d30c1445f4142d7e2a1410c746 | refs/heads/master | 2023-03-15T17:32:10.812407 | 2018-12-13T06:06:01 | 2018-12-13T06:06:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,988 | py | lab9_mandelbrot.py | # mandelbrot.py
# Lab 9
#
# Name: Bhavin Soni
# keep this import line...
from cs5png import PNGImage
# start your Lab 9 functions here:
def mult( c, n ):
""" mult uses only a loop and additi onto multiply c by the integer n"""
result = 0
for x in range( n ):
result += c
return ... |
583ed3b60acaea53ef83ce73bcda64805f85b7cf | 180bfde53b69f0512ad93f4af4cc353694f6277a | /19day/1-不重数.py | c5f53973210fec333c619d94874696aed1eb77b8 | [] | no_license | huguowei123/1807 | 377c68ae1e39daee794518ba47024d1091ceae61 | 74b47b4b7d64d9526c8af17b17eadc2e2b24215c | refs/heads/master | 2020-03-23T22:03:30.512353 | 2018-08-23T09:31:22 | 2018-08-23T09:31:22 | 142,150,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 119 | py | 1-不重数.py | for i in range(1,5):
for a in range(1,5):
for c in range(1,5):
if i != a and a != c and c != i:
print(i,a,c)
|
3eae873cc3697e5544cf05ca3fe5d40cb56094df | 771ea712a493d34ea456b1bdf95241c9a56cc6fc | /python_code/dtc.py | a24414bbcc8dae8ff682328f3a9d23f1055e54a2 | [] | no_license | Shree1108/sttp | dea926be574c2c0c240f5c9b618afae8dbee2ac9 | f776c25725865219df34c45aa632ef0a505b8645 | refs/heads/master | 2021-05-14T10:19:36.806722 | 2018-01-05T04:19:11 | 2018-01-05T04:19:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,390 | py | dtc.py |
print(ord('A'))
print(chr(65))
#Example DTC To Tuple
# 1) list -> tuple
print(tuple(['pull request', 'open source', 'repository', 'branch']))
#Note: We can convert any iterable type to a tuple, including strings:
#2) string -> tuple
print(tuple('Nilesh'))
#3) string -> tuple
print(tuple('1000'))
#4) integer -> ... |
29491db85a899373aa1582812e1a2ef865a4f10f | 23b333449524887594530f73c0079ce60cb8eefb | /python_module/examples/271_Encode_and_Decode_Strings.py | 413ab454f240f74a6ba428282db0396f07b1ab48 | [] | no_license | benbendaisy/CommunicationCodes | 9deb371095f5d67e260030d3d8abf211c90e7642 | 444cc502ef26810b46115797f2e26ab305a4ebdf | refs/heads/master | 2023-08-09T21:46:58.691987 | 2023-07-20T05:11:39 | 2023-07-20T05:11:39 | 27,856,438 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,132 | py | 271_Encode_and_Decode_Strings.py | from typing import List
class Codec:
"""
Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list of strings.
Machine 1 (sender) has the function:
string encode(vector<string> strs) {
... |
66c1335f25017cab96fbffa57883b2168dfadbbc | 0cc3b0ce23eff6baa0e25d8855ae1701d4b35c14 | /Fourth SI week/first_not_consecutive_element.py | d65b3fb24f006dfde1e63a5e3e236b7bf69f1165 | [] | no_license | AndreeaNenciuCrasi/Programming-Basics-Exercises | 8ba342f91d0be4bb8da509ac725b90a0eeb798c4 | 253c650dff4e657918f81eea9cfe200d3fbf5ea8 | refs/heads/master | 2020-09-20T03:37:09.943056 | 2019-11-28T08:42:33 | 2019-11-28T08:42:33 | 224,367,537 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 982 | py | first_not_consecutive_element.py | # Your task is to find the first element of an array that is not consecutive.
# E.g. If we have an array [1,2,3,4,6,7,8] then 1 then 2 then 3 then 4 are all consecutive but 6 is not, so that's
# the first non-consecutive number.
# If the whole array is consecutive then return null or Nothing.
# The array will always... |
ddc91f4c69aa3024c30d9f81a81093d85b0cbf72 | f77472761b2a251a79dfb1fb3e57666d8f938e23 | /final/admin.py | 1cb23e522bbd1622f3f13ce7b0c327ed84b26b3e | [] | no_license | zedrickr11/examenfinalprogracomercial | 063cf633159a029815a614e86394eaab6ced3e00 | fb4cdff316e576dabd527c9048c7b5855fa2939d | refs/heads/master | 2020-04-07T09:32:22.116040 | 2018-11-19T17:31:17 | 2018-11-19T17:31:17 | 158,256,150 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 286 | py | admin.py | from django.contrib import admin
from final.models import Profesor, Alumno, Materia, Grado, MateriaAdmin, GradoAdmin
# Register your models here.
admin.site.register(Profesor)
admin.site.register(Alumno)
admin.site.register(Materia, MateriaAdmin)
admin.site.register(Grado, GradoAdmin)
|
59ff80f492d47601ce03900f1bccfa6e36931c62 | 1cfc9babb863c973603db6097e0ee5f0b0cc7694 | /installer-pkg/packages/code/mgi-mdcs-ammd-1.5/explore/models.py | e0baad19200d148e33b466f17107ecfd4b3154cf | [] | no_license | Huchikoma/internship_MMQ | 933afe0c5445170b3daa3397ccf2e310a6dda68b | dc7c9f7e4b243b6d418c39ea1f5d28ae8cd34528 | refs/heads/master | 2020-04-11T20:09:14.353684 | 2019-04-19T01:55:49 | 2019-04-19T01:55:49 | 162,061,524 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,181 | py | models.py | ################################################################################
#
# File Name: models.py
# Application: explore
# Purpose:
#
# Author: Sharief Youssef
# sharief.youssef@nist.gov
#
# Guillaume Sousa Amaral
# guillaume.sousa@nist.gov
#
# Sponsor: National Institute of Standards... |
4d6730992165cd6ca6a2d722f933da194d50f231 | d40d0303563ea9c1a3c2468afb4512bb41d2f2a6 | /lesson6.py | f87212da842908bc8d8db52f32a851d8a4da7d49 | [] | no_license | Saqdanielyan/lessonpython | 347691e3d9d3d3c2e169f1429cf9da426c29d5af | cbbb92a13c4d4528fe5a43a0f8133cdd778a3049 | refs/heads/master | 2023-03-22T13:40:24.415351 | 2021-03-06T13:07:43 | 2021-03-06T13:07:43 | 345,090,465 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,230 | py | lesson6.py | # age = int(input('Age '))
# rays_age = age > 18 and age <= 40
# ser = input('Ser(f or m): ').upper() == 'F'
# krtutyun = input('Krtutyuny(b- barcraguyn)').upper() == 'B'
# verjnakany == says_age and ser and Krtutyuny
# print(verjnakany)
# x = 4
# b = x < 5 or x > 10 ##or
# print(b)
# x = 4
# b = is not(x < 5 o... |
56b50edd9476570faa38430963692b79e47063e1 | 816aa072d62abaeb76c3a33a1eb01661005ffa58 | /src/knapsack_greedy.py | c9ea9ff796178980351a78054ca3d7d6afa2da9c | [] | no_license | jeremymiller00/computersciencedistilled | fc75c91efd6294f081dd2d6813e469cb8f9dff8b | 80d63c4993895ec2ae8fe97c451cceb65dc7f093 | refs/heads/main | 2023-07-03T14:06:45.636077 | 2021-08-08T02:47:54 | 2021-08-08T02:47:54 | 387,535,813 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 907 | py | knapsack_greedy.py | def total_weight(items):
weight = 0
for item in items:
weight += item[0]
return weight
def total_value(items):
value = 0
for item in items:
value += item[1]
return value
def knapsack_greedy(items, max_weight):
"""
O(n log n) + O(n)
Not guaranteed to be optimal
... |
db44632c3eb238b4616794d5eb5f837e4f538b32 | f9d64555b85c5b9ca577a90f0a92ad258f23f91f | /common/printEdgeDistributions.py | da3ed2d3f3c8e4edacbf319de93dd2673e1a85fc | [] | no_license | wchickering/cs399 | 055530e401d12edcd902a0c952ccf00a4ef2ee7e | 6f3325faa650d1af0e114d446f208a4ed58c33ca | refs/heads/master | 2021-01-22T09:26:45.686385 | 2015-07-21T01:23:34 | 2015-07-21T01:23:34 | 16,038,545 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,343 | py | printEdgeDistributions.py | #!/usr/bin/env python
"""
Prints the degrees of each node
"""
from optparse import OptionParser
import os
import sys
import pickle
import math
from collections import defaultdict
import operator
#local modules
from Util import loadPickle, getAndCheckFilename
def getParser(usage=None):
parser = OptionParser(usag... |
c94efb0919c73cf06dd95a2fc444d6aecc156537 | 114b2f71e553abc33f7774de00391488c74b1563 | /test_tcpserver/Cserver.py | b69b5250b3527acc0cfd14cd45061539d99c4b36 | [] | no_license | 279zlj/Autotest_project | 06589305df696b21e05a4f521a56c8170ec7b327 | 60576bfe56d9a4e76a590bfa3176e196d06dbeed | refs/heads/master | 2022-12-14T03:42:49.933047 | 2018-08-28T03:15:53 | 2018-08-28T03:15:53 | 146,384,029 | 0 | 0 | null | 2022-12-08T02:23:10 | 2018-08-28T03:00:05 | JavaScript | UTF-8 | Python | false | false | 1,354 | py | Cserver.py | # 测试用例,模仿c程序的监听
import socket
import _thread
from client.c_client import Client
def process_request(connection):
data = connection.recv(2048)
data = data.decode('utf-8')
print('接收到的数据', data)
client = Client('192.168.1.221', 3000)
client.send_msg_to_c(b'BoardName:Z97 Pro3/BisoVersion:P1.20#CpuNum... |
f0317118d1bc189db10e7e8b250a5f36b9af10b6 | dabbd49e695f2c2d8499fca50f6835ee08e6a927 | /Twitter_brute.py | b01f93c7cdc86c9844dcf014510a117e8ea34419 | [] | no_license | n3twk/offensive-python-simple | 2809d698ba2722fdee43c39faa156e26df81e9ec | 50378fbfa4172bf18f46ed065017a3915c95ce2a | refs/heads/master | 2020-03-18T13:08:50.304945 | 2018-06-02T19:52:06 | 2018-06-02T19:52:06 | 134,763,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,199 | py | Twitter_brute.py | #!/usr/bin/env python3.6
import mechanicalsoup
import argparse
import random
import time
def login(username, password,agent,verb=False):
global response
browser = mechanicalsoup.StatefulBrowser(soup_config={'features': 'lxml'},user_agent=agent)
#browser.set_user_agent(agent)
browser.open("https://www.t... |
b30bd6073cf8b08bde9cdd1821a820be46cac142 | 330cc97446a1ac417c33e7a20ba30fd4e5273847 | /exercise_tensorflow/save_model.py | db060a2a0367a9f0ac0f5bc63f322d07d24910cf | [] | no_license | Xiehuaiqi/python_script | 183e07648ad690be052507290529ba697921b977 | c831c163ae1c5be4b4ba1a37910ef73b7b525faf | refs/heads/master | 2023-04-13T09:35:31.421192 | 2022-07-12T06:46:40 | 2022-07-12T06:46:40 | 186,339,151 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 301 | py | save_model.py | import tensorflow as tf
v1 = tf.Variable(tf.constant(1.0,shape=[1]),name="v1")
v2 = tf.Variable(tf.constant(4.0,shape=[1]),name="v2")
result = v1 +v2
saver = tf.train.Saver()
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
saver.save(sess,"Model/model.ckpt")
|
63d8ab6674551bc5cc6833dfb5ce9670e992d8d2 | 4d6fd90a0be0ac03168f4deec597751cb38df018 | /UTA_bot.py | ff1973a459852181161b911c1a6e7e4f5301e531 | [
"MIT"
] | permissive | joshuadeng-zz/UTA_bot | bc9bb3ec4742520a69c36044b4bd0fcca8d291c7 | e948eabcb0eb0aa835d739ee7c45a4116d4fb561 | refs/heads/master | 2023-05-08T15:02:45.417730 | 2018-02-17T08:26:06 | 2018-02-17T08:26:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,821 | py | UTA_bot.py | import praw
import time
import os
REPLY_MESSAGE = "Friendly reminder: 'UTA' refers to UT Arlington. UT Austin is simply 'UT'.\n\nIf you actually meant UT Arlington then ignore this post."
def authenticate():
print("authenticating")
login_info=retrieve_credentials()
reddit=praw.Reddit(username=login_info[... |
4b6cc185009d16492f647476c6cac6fae5a3223f | 906a5a04c167deeddec9e0358134508fa910883b | /home/migrations/0002_employee.py | 744345dd7e1eb621d15dbc3df227acb9bcdeba42 | [] | no_license | kwonsssen/warak | 2cde032d05c5208fc33255f9023c6e3d98b9827c | 1a71f0a1daf025e9c03243877b19a5a8a678bfdc | refs/heads/master | 2020-09-21T14:06:40.386630 | 2019-11-29T08:47:10 | 2019-11-29T08:47:10 | 224,811,458 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 949 | py | 0002_employee.py | # Generated by Django 2.1.2 on 2018-10-10 13:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Employee',
fields=[
... |
510b17a9a35a410a0c9a40327e4cb459e8de1df0 | 50ca901f0cf37debb34fa0621d3bfd17a31a7215 | /spec/fut_cheat_win.spec | e6bc23be2a45aeef3405bd4abe83077149e6ad69 | [
"MIT"
] | permissive | GermanKingYT/FUTCheat | 71f451fe2210be8c7712ce5558b8f67a9e979e35 | 0581cbd41887cd47b91ffbdad50c7bee30738c71 | refs/heads/master | 2021-04-28T17:44:35.157080 | 2015-06-22T18:20:43 | 2015-06-22T18:20:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 531 | spec | fut_cheat_win.spec | # -*- mode: python -*-
a = Analysis(['fut_cheat.py'],
pathex=['c:\\Users\\TJ\\Documents\\FUTCheat'],
hiddenimports=[],
hookspath=None,
runtime_hooks=None)
a.datas += [('res\\favicon.ico','res\\favicon.ico','DATA')]
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,... |
fa38d5bfa715c06c91a0c8c599f2f6ab45b3df86 | 0b1a142a39bfe33fdbda45fe70ef537ea70f9e21 | /pc_side/gui_module/resorce_rc.py | 6e8fe6abcf57d7327e728489cc567c90ea518307 | [] | no_license | SuroWka-Roch/WojSur_Masters_Deg | 9f0dd2993ba9d43aa515d2e8fb7239009c10c7c3 | 921dfab3cfb4279bf1378b41faaf0c9cbb7de04b | refs/heads/master | 2021-06-30T10:12:00.827695 | 2020-09-14T11:18:57 | 2020-09-14T11:18:57 | 196,086,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220,569 | py | resorce_rc.py | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.12.4)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\xcf\x4d\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x01\x00\x... |
b404e45eccb15101b3a586bd46b5e1a03cf4e2a7 | 038a5d852700fc3c773dbfe1f5b6316d028d7637 | /prasetia-hr/wizard/personal_absen.py | 1cd5f6c5552864448a89d30c517b3ebbe7501961 | [] | no_license | PravinShahi0007/myaddons-ztk | 457b44e1f64c8cca0e2377646ba72126906f0544 | 97c7a14036c7d74a108e5cfdc43cc1da2267a3e9 | refs/heads/master | 2023-06-12T19:07:32.444045 | 2018-02-05T04:08:48 | 2018-02-05T04:08:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,754 | py | personal_absen.py | from datetime import datetime
from odoo import models, fields, api
from odoo.exceptions import UserError
class personal_absen(models.TransientModel):
_name = 'hr.employee.personal.absent'
_description = 'Show personal absent report'
employee_id = fields.Many2one('hr.employee', required=True)
month_f... |
31bb3b927c86ac9c9bcf8b61472bc2056a79f717 | 96c0a8c5301f97d8ec5193ead7f58768ee17040a | /openn/tests/test_op_workbook.py | 8fe90d5d728ed09ae2253af41b5abbe354a7aa95 | [] | no_license | KislakCenter/openn | 7a6b2de5e03ff6663bb321cfd16d5809ab58e151 | 8b410f08713b778d6dd0e5d60cff558f20c27a26 | refs/heads/master | 2022-12-15T23:07:17.902112 | 2020-09-03T16:28:19 | 2020-09-03T16:28:19 | 294,202,198 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,572 | py | test_op_workbook.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import json
import pprint
from django.utils import unittest
from django.test import TestCase
from django.conf import settings
from django.core.exceptions import ValidationError
from openn.prep.op_workbook import OPWorkbook
from openn.tests.helpers import *
from... |
c346ecab3f598b627c3535442285250098a138ea | 60d14cfc792746719902ebf149c4c783536dbcba | /countdown_final.py | 186b76d1c1aee0a817c38a5bd70c446dcddca2dd | [] | no_license | geoe9/countdown-sim | 1d54273efd869188d96057292c849647b2beffd0 | 7490fd5c1225918ae1c4cf06d3038d1ea9e2c08c | refs/heads/master | 2023-01-03T23:58:56.355844 | 2020-10-31T14:37:02 | 2020-10-31T14:37:02 | 260,716,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,942 | py | countdown_final.py | import random
from itertools import combinations
CONSONANTS = ['B', 'C', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 'X', 'Y', 'Z']
VOWELS = ['A', 'E', 'I', 'O', 'U']
#letter distributions according to http://www.thecountdownpage.com/letters.htm
C_WEIGHTS = [2,3,6,2,3,2,1,1,5,4,8,4... |
434149efa12eabe81a12455b956f299f692eb214 | 9375af6c9b913a79a31d7263b80499bed9d36893 | /Scripts/mol_init/lighting_designer.py | 0dd30a5ba270a201a2afa99419ddf581bfe28d0c | [] | no_license | sept64/blend_mol | 210ff007b69e1fc07206fcf0076be686a5406f72 | 2a93f97aa5cb4ef5a72db0edd137ccdc613dab38 | refs/heads/master | 2021-06-05T21:13:53.998928 | 2020-05-20T07:51:49 | 2020-05-20T07:51:49 | 139,825,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 553 | py | lighting_designer.py | #!/usr/bin/env python
# -*- coding: utf8 -*-
"""
Class LigtingDesigner of the blend_mol project
allows to place lights in the scene
"""
import bpy
class LightingDesigner:
def place_lights(self):
"""
Places 4 lights :
* -10, 0, 12
* 10, 0, 12
* 0,-10, 12
... |
7e80d6ae4744923787f96e9d34b995a5d816671d | d3bd677497dcf056cfe4e7e627a06e9db8646d32 | /changelog/__init__.py | 944a18e5685b9b93e5b72650c1230699fbc4fd30 | [
"CC0-1.0"
] | permissive | patricksnape/github-changelog | a784758299c7b80f82c49d2b18bacf1bdfe90140 | ac1acc110b880b05f2c9f489806628e0ace9bca6 | refs/heads/master | 2021-06-25T13:01:51.237033 | 2021-01-09T16:59:46 | 2021-01-09T16:59:46 | 196,278,572 | 0 | 0 | null | 2019-07-10T21:41:29 | 2019-07-10T21:41:29 | null | UTF-8 | Python | false | false | 9,404 | py | __init__.py | # -*- coding: utf-8 -*-
"""
This is a script to determine which PRs have been merges since the last
release, or between two releases on the same branch.
"""
import argparse
import os
from dataclasses import dataclass
from datetime import datetime
from operator import attrgetter
from typing import Any, Dict, List, Optio... |
0c709915c4cb01119570602bf7144313947a0139 | 62d99f0b8b297757554f781e0338116d07d88381 | /yixun_ext.py | 44bea6410d5197b37077ab745e2590b1ce6f020c | [] | no_license | lijupan/learngit | c0417a9189f37aa7c0bf31c648f07a4457dee370 | 59c63d7ec0a5de5553c33c7197c3a1bf539eae1d | refs/heads/master | 2016-09-06T18:36:23.719626 | 2015-07-16T09:36:27 | 2015-07-16T09:36:27 | 39,191,292 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,159 | py | yixun_ext.py | #!/usr/bin/python2
from odis.serialize.lib import MD5Writable
import json,re
# 错误的促销信息
Error = None
# 未配置促销信息
Info = []
# 结构化促销信息
Result = []
pricePattern = re.compile(u"([0-9]+)(?:\\.[0-9]0)?");
def appendError(newError):
if newError is not None:
global Error
Error = (newError if Error is None e... |
85f95a8d23f96bb878b669553f12542e540b6212 | bb142cd1c166b762d3648eeec776d020c5f42ec8 | /HALO/data/__init__.py | 3130603008f57e79bbcddc6121b7604e7d8a369a | [] | no_license | lotcher/HALO | e35fd89f1e48d199ac571d2e3f9283bca2bef081 | 31ec02507b3d6ce24826c2984d1ae0a38c6518b0 | refs/heads/main | 2023-07-13T20:40:36.804414 | 2021-08-23T10:26:52 | 2021-08-23T10:26:52 | 397,790,843 | 10 | 0 | null | null | null | null | UTF-8 | Python | false | false | 102 | py | __init__.py | from .attr import Attr
from .telemetry_data import TelemetryData
from .value import Pair, Combination
|
48e6d9753138213f6802adb4fe68f914fd174999 | 0c54d17194ac9ba8484e0d59ae6a9b241e7dd88e | /table.py | f3b65d1c0ef13fa9ecb8f89d575ebda853e834bd | [] | no_license | chandraprakashh/1_sem_2_sem_python | f9310a8c3866f69f152b8c2bb465250d78d54f16 | 1ffd3fd181c5b6283ed26a7c304076436b5c3a49 | refs/heads/master | 2020-07-18T18:30:46.646401 | 2019-09-04T10:26:40 | 2019-09-04T10:26:40 | 206,292,357 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | table.py | #
num = int(input("enter the one number:"))
# use for loop to iterate 10 times
for i in range(1, 11):
print(num,'x',i,'=',num*i)
|
aca29190a0aae2f6d9cecd41aabed277fa323874 | 406bf4b0869f5336c048d0269b7ec34ba029ec99 | /view_drf/users/serializers.py | e6422fec7728fef23c8ad8a1eeedfc2be2c78edf | [] | no_license | Lucky3337/view-drf | 046c3dbe09bff72478b5d7d7d0b7f957c49ef392 | b39ab0f9d5af3c30b9e1702902400166b20f8d6b | refs/heads/master | 2022-02-05T09:12:54.025066 | 2019-09-28T20:38:03 | 2019-09-28T20:38:03 | 205,227,819 | 0 | 0 | null | 2022-01-21T20:00:53 | 2019-08-29T18:37:07 | Python | UTF-8 | Python | false | false | 1,729 | py | serializers.py | from rest_framework import serializers
from .models import User, Cat
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ('id', 'username',)
read_only_fields = ('username', )
def update(self, instance, validated_data):
"""
Update and r... |
0405bdbd6aee62b0bea877629d2e903e6ac4719e | 16fef0601fd3a79620b395bd8b3c2febc31c8b1f | /Pyshare day 02/PyShare D2_py code/10.py | ae4a738e17cd64398a439bd063486f8fd01f9ff0 | [] | no_license | iihciyekub/PythonCrawler | 9724f90c822610618c29eb255a7712e2ee7b2597 | 35cb30a395a0e86fc1df111f682cd444ce521d89 | refs/heads/master | 2020-08-08T09:06:16.603136 | 2019-10-09T02:51:12 | 2019-10-09T02:51:12 | 213,800,788 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 209 | py | 10.py | import requests
from pyquery import PyQuery as qp
response = requests.get('https://www.baidu.com/')
# 判断响应代码 200表示正常
print(response.status_code)
# 打印响应信息
print(response.text)
|
489b3f38a1383048fea3799773b75fc80b1099a6 | 7de1d7eb2c2f2dc58f644d970ccb006d7e3d56d8 | /urls.py | 67f773ecbb0ef0e49c4095b99609b3dd7b80078b | [] | no_license | backface/riverstudies-django-app | 8ffbaa8ff657c9dad657b2f26c47114975312621 | 9276318cfa704cf70b20a3824d7b1bb21dede043 | refs/heads/master | 2016-09-06T00:42:28.463741 | 2012-02-03T14:19:57 | 2012-02-03T14:19:57 | 3,056,141 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 775 | py | urls.py | from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^list/', 'riverstudies.riverview.views.list'),
(r'^$','riverstudies.riverview.views.index'),
(r'^view/', include('riverstudies.ri... |
c73bce9e0381c2ec4cb8b6e159ffce9f169b1073 | b218a4c5cd0cb88f60e091de98084624c8a5116c | /capitulo_6/pg156_dicListas.py | 13f75cd9c3f89ad18d7e10eebfdaf90d8b458add | [] | no_license | GustavoGuke/py | c98dc7add59f1c1db8e8b7b56aac3f7e817675a3 | eafeb179931ff5e2810490e4aaa652994c36d466 | refs/heads/master | 2022-11-19T01:16:40.105703 | 2020-07-20T18:49:16 | 2020-07-20T18:49:16 | 266,141,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,211 | py | pg156_dicListas.py | print('uma lista de dicionário')
alien_0 = {'color':'green', 'points':5}
alien_1 = {'color':'yellow', 'points':10}
alien_2 = {'color':'red', 'points':15}
aliens = [alien_0, alien_1, alien_2]
for i in aliens:
print(i)
print('...')
#=============================================================================
#cria... |
54f9cec79c2fdffe6d0cf0f69fd3212dfc7b2d36 | 745f58a02e94343f67fa5b5af5915aee2b2c9aa7 | /examples/multiprocessing/parameter_server.py | 5301af24f187966f6640a0aa4134bb0ed1bf2c08 | [
"Apache-2.0"
] | permissive | Cohen-J-Omer/lithops | f1fbfc0ec678f09e9a03ea24d75dcf01fd9cf766 | 12bf3babbce6e9eb70a5e16cdd40093552a2ecfc | refs/heads/master | 2023-07-19T11:31:46.048211 | 2021-09-22T18:35:11 | 2021-09-22T18:35:11 | 342,170,785 | 0 | 1 | Apache-2.0 | 2021-07-25T13:05:24 | 2021-02-25T08:15:30 | Python | UTF-8 | Python | false | false | 1,034 | py | parameter_server.py | import numpy as np
import time
from lithops.multiprocessing import Pool
from lithops.multiprocessing.managers import SyncManager
# from multiprocessing import Pool
# from multiprocessing.managers import SyncManager
class ParameterServer:
def __init__(self, dim):
self.params = np.zeros(dim)
def get_p... |
5db19f576835ecc99a34463d175464a46fde763b | 2ff9dba4261e022e98470eca159b7ce7057505c0 | /arl_study.py | 8919af7ed2e8b5d7ed798ddf127a0cdb23d58ad6 | [] | no_license | Marco-Christiani/MSPC-Analysis | 222360a2015efbb3efdf7b92cadbe575bb365ad6 | cfc633888a23bc8bd3bab4c24118a43cd3f2bbc3 | refs/heads/main | 2023-02-04T13:32:10.771701 | 2020-12-23T00:38:04 | 2020-12-23T00:38:04 | 323,365,976 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,707 | py | arl_study.py | import mase
import mitten
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import time
import sys
import os
from datetime import datetime
def generate_dataset_sd(features, sd_shift, N=1000, n_out_control=30):
"""
Generates a dataset with 1,000 observations
The last n_out_control obse... |
57cf47389efb1123fec4a9fe921f88e24b75ec16 | d395c3072ade56c4ee68c0d054d4f2510faf813f | /base/migrations/0010_auto_20200528_2247.py | a652d37e2eb997532d2284cdf23e77c915bc1532 | [] | no_license | spassaro80/solomartel | 23b6ebdae1d956346d4d4f3953ea32177c63b88f | da7f2c9e7ce0c3f89a267b5f821f59a9163bbb8d | refs/heads/master | 2023-05-24T07:31:41.438755 | 2020-06-12T16:45:43 | 2020-06-12T16:45:43 | 271,842,750 | 0 | 0 | null | 2021-06-10T23:02:53 | 2020-06-12T16:26:27 | HTML | UTF-8 | Python | false | false | 1,271 | py | 0010_auto_20200528_2247.py | # Generated by Django 2.0.4 on 2020-05-28 22:47
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('payment', '0002_auto_20200528_2247'),
('base', '0009_auto_20200511_2259'),
]
operations = [
migrati... |
7444d3eccfc49c602480ca9af1830ac9ce6aea36 | 99101ab8ddbd8dbf34d01bdfc4e15d56848ab6e7 | /official_solutions/birthday.py | a05b7212dc199f76817e2bba9d81a92dcd8e3504 | [] | no_license | adambemski/book_think_in_python | 553a595c53475b3d927782f1776085df3a7bc3aa | 638225d26f1c6d8bae0ca755fcae1fd631685a92 | refs/heads/main | 2023-03-21T14:27:17.362329 | 2021-03-11T20:58:36 | 2021-03-11T20:58:36 | 345,181,127 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,787 | py | birthday.py | """Moduł zawiera przykładowy kod powiązany z książką:
Myśl w języku Python! Wydanie drugie
Allen Downey
http://thinkpython2.com
Copyright 2015 Allen Downey
Licencja: http://creativecommons.org/licenses/by/4.0/
"""
from __future__ import print_function, division
import random
def has_duplicates(t):
"""Zwraca ... |
3a75732bc972417708f8ac395d046033abbaf121 | 6a553b6ff92c9ce9ae6fb9c28c3e0002f82d0f44 | /libs/animation_nodes/zh_CN.py | 70ad2598432e7f093d734aecf35665e3044ae009 | [] | no_license | 245279213/addons_languagepack | a2ad5816344b0aabb78d904db6b493e203e43d29 | 4f81262ccf6d9ab2154f9bac9a4f0f267ff77ef3 | refs/heads/master | 2023-03-18T11:51:20.624161 | 2020-10-28T09:45:01 | 2020-10-28T09:45:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 37,453 | py | zh_CN.py | # -*- coding: utf-8 -*-
lang_dict = {
# bl_info
('*', 'Node: Animation Nodes') : '节点: 动画节点编辑器(Animation Nodes)',
('*', 'Animation Nodes') : '动画节点编辑器',
('*', 'Node based visual scripting system designed for motion graphics in Blender.') : '基于节点的可视化脚本系统,专为 Blender 中的运动图形而设计。',
('*', 'Animation Nodes... |
2baf5a78b83e9640997ae630b0b71abdbd0cac7f | 6fc399d58dca281bce88f92bd3073f40bd6eaa0a | /sonicwall_code/connect.py | d4ea2e79932c54e050e34868277a7be91dd110df | [] | no_license | PohanYang/SonicWALL | 222a35ba1c3047e65150b0cf7c7ee7693dc54e5f | 7c12c56097be8b8b5bf9efa0197f81915b86bf61 | refs/heads/master | 2021-01-13T10:06:54.132424 | 2017-08-28T08:02:18 | 2017-08-28T08:02:18 | 72,115,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 291 | py | connect.py | # this code is connect to MySQL database information
# about database name, root member, root password...
import MySQLdb
db = MySQLdb.connect("localhost","root","123","sonicwall")
#cur = db.cursor()
#cur.execute("SELECT * FROM test")
#for row in cur.fetchall():
# print row[0]
#db.close()
|
4f882161abd5a7b53076e7f4ed77fca1f2a76822 | 2269285e9f2d54df990b716f145fb5c464bf1583 | /TargetDetection/TargetDetection/TargetModels/mask/mask_predict.py | 91c444254ff52177aba3aca44bbfe03672ec709e | [
"Apache-2.0"
] | permissive | Scottyoung99/ASL-Detection | 6178f09d967619b7b762d1d519114c1fbb67ade6 | 36e5dba973c8a0192f4918a44ed6dcbdd7f17c75 | refs/heads/main | 2023-02-25T10:31:50.489391 | 2021-01-17T09:57:22 | 2021-01-17T09:57:22 | 330,075,490 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,939 | py | mask_predict.py | import TargetModels.cascade.detectron2
from TargetModels.cascade.detectron2.utils.logger import setup_logger
setup_logger()
# import some common libraries
import numpy as np
import cv2
import random
import datetime
import time
import tqdm
import os
from PIL import Image
from TargetModels.mask.detectron2 import model_z... |
f38a25c851c3117b6d504721e7b607bc41381159 | 23ee1140f67f13b5938fe24333dae43a4f06828d | /getapp.py | f5f9263dcad7080aa3e3902e93c32ab68997da1b | [] | no_license | gongcm/python-spider | e4b97d31ef4d76dac40c205c662ff1ac49a2d5d2 | a8b4eba13b8c558192854c1e715143d84a9ac178 | refs/heads/master | 2020-06-13T21:34:35.375091 | 2019-07-02T06:48:36 | 2019-07-02T06:48:36 | 194,795,204 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,214 | py | getapp.py | # 英文验证码的登录方式
# 中文登录(点击倒立文字)
import requests,time,json
from hashlib import sha1
import hmac
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
headers = {
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) G... |
c9a5c479ffc2109cd3a2dedcf2f1a0c9e9af725c | 5bc34d6607c02bbdca45920d9e650ed79d7f2d88 | /app.py | 15d11a64f7fb968d42c80590334d20989b1dbcac | [] | no_license | petrosschilling/Mirror | 032a5a40ca1c674cb1a400439e397f8430fde570 | 454401e9b4217e8a8764173d441a0f9d96e60276 | refs/heads/master | 2021-07-14T15:22:47.849445 | 2020-07-02T06:41:15 | 2020-07-02T06:41:15 | 178,975,751 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,171 | py | app.py | from model.mirror import *
from db.dba import *
def yn_to_yesno(arg):
if arg == "Y" or arg == "y":
return "yes"
elif arg == "N" or arg == "N":
return "no"
else:
return arg
def readdigit(inputmessage=""):
val = ""
while not val.isdigit():
val = input(inputmessage)
... |
bf78b92f914d659d79131d82858a78768e835e54 | b8dd7ba4f009e0e7d051b4f25a07ae53a6153cf4 | /mcq/migrations/0002_alter_quiz_question.py | 98f61dd68146fbcbc7ec7de45cf5fb4b40ed6515 | [] | no_license | happybanana13/djangomcq | f1596a9242425b2df127a939589f35873e32d9d9 | e41be7bbaff895c8955078e428666ef5777500f7 | refs/heads/master | 2023-04-22T21:58:15.967236 | 2021-04-25T19:12:44 | 2021-04-25T19:12:44 | 359,594,855 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | 0002_alter_quiz_question.py | # Generated by Django 3.2 on 2021-04-25 18:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mcq', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='quiz',
name='question',
field=m... |
ce8ffcc46cf7d86b8dff42656ee4577391d36561 | 3d76e9f4647700fb7afe59f66f51f08771e722e9 | /orders/migrations/0012_paymenttype_available.py | cd4a0f2b455fd6a2607e53cdfe17e5c7810c36c3 | [] | no_license | amenabe22/taywan_shop | 2123995744b756f239da0ddbfdbab8d559b83c03 | a7183ff8d5a957ae04dfba15624350f8b838457f | refs/heads/main | 2023-04-12T00:30:34.135916 | 2021-05-03T15:34:00 | 2021-05-03T15:34:00 | 358,402,960 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | 0012_paymenttype_available.py | # Generated by Django 3.1.2 on 2021-04-17 08:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0011_auto_20210417_0828'),
]
operations = [
migrations.AddField(
model_name='paymenttype',
name='available... |
a10d357d1d6384e29ebc2aaf498275637ca50b29 | a24852871e6ba1421311a325e725ea4fd44cb2e9 | /tf_yarn/_internal.py | c6967f5cf193376eef9c66d05635b20febef17dd | [
"Apache-2.0"
] | permissive | criteo/tf-yarn | 15938ca10e00834ec67a19fa68d1b1db19978631 | 0326638f66a3447790d536d160a6060ab5043e7a | refs/heads/master | 2023-06-07T08:45:33.652043 | 2023-06-06T09:07:05 | 2023-06-06T09:07:05 | 147,503,822 | 93 | 25 | Apache-2.0 | 2023-06-06T09:07:06 | 2018-09-05T10:55:33 | Python | UTF-8 | Python | false | false | 2,725 | py | _internal.py | import logging
import os
import platform
import socket
from typing import (
Optional,
Tuple,
List,
Iterable,
Iterator
)
from contextlib import contextmanager
from threading import Thread
from tf_yarn.topologies import ContainerTask
logger = logging.getLogger(__name__)
here = os.path.dirname(__fil... |
7523e102fc5864a3541103db0afcaa31736f34e6 | 0c4309d55acb30fb3270400ba9243764193573a0 | /parte_2/semana_4/test_busca_sequencial.py | 38ed056b8a248baf18f7a939f4f9237a27fff325 | [] | no_license | mwoitek/python-coursera | 8936e39eece19bb40caa1dab98b14529dc836db7 | 90d5d390868d0d0147d837939ee0fab2450c646c | refs/heads/master | 2022-04-25T20:02:45.984640 | 2020-04-30T01:16:57 | 2020-04-30T01:16:57 | 244,276,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,834 | py | test_busca_sequencial.py | #
#
#
# ██╗ ██╗ ██████╗ ██╗████████╗███████╗██╗ ██╗
# ██║ ██║██╔═══██╗██║╚══██╔══╝██╔════╝██║ ██╔╝
# ██║ █╗ ██║██║ ██║██║ ██║ █████╗ █████╔╝
# ██║███╗██║██║ ██║██║ ██║ ██╔══╝ ██╔═██╗
# ╚███╔███╔╝╚██████╔╝██║ ██║ ███████╗██║ ██╗
# ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
#
#
#
# ____ ... |
8a249299418c39636331f91b9171f28063575fc3 | 1c0d6381441b5534977174a9f21ab8fc389a6955 | /shellfoundry/models/shell_template.py | 8c431977f44a9fd0d5e3cb6a52b7e1b5b17092bb | [
"Apache-2.0"
] | permissive | QualiSystems/shellfoundry | c6fdbde7ce5cdc526d1f414d75ea025a255a11ac | d4872f0f238685c053cacc327c28400eeea2c21a | refs/heads/master | 2023-05-11T13:34:58.087023 | 2023-05-08T13:37:03 | 2023-05-08T13:49:39 | 48,379,552 | 10 | 30 | Apache-2.0 | 2023-05-08T13:49:40 | 2015-12-21T15:36:45 | Rich Text Format | UTF-8 | Python | false | false | 523 | py | shell_template.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
class ShellTemplate(object):
def __init__(
self,
name,
description,
repository,
min_cs_ver,
standard=None,
standard_version=None,
params=None,
):
self.name = name
self.description = descri... |
7615b6d5e90016994bb6d1e858c4883d48b055d8 | f8533106002d90e5cf2cb1ffe71cca59096206d2 | /server.py | 19cf1885b966b1d915f5338c89d7286543f9ad1a | [] | no_license | gromovart/Python | 29565f65a7da5ff5b0f2e36073170facbee85096 | c73f32dc3a8af0e30afe0a1441028dcec5953953 | refs/heads/master | 2020-05-23T12:15:21.050954 | 2019-05-15T05:24:59 | 2019-05-15T05:24:59 | 186,753,874 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,058 | py | server.py | import socket
import threading
import sys
sock = socket.socket()
sock.bind(('localhost', 3003))
sock.listen(10)
conn = []
def request_to_read():
while True:
for i in range(len(conn)):
try:
request = conn[i].recv(1024)
if request:
print(reques... |
50595ca35d6dc70d42a8fe7b13fd9819d6458f60 | 0e77d47f5caa552475bca23d0a9378c7dcfedd10 | /sf9w2sf9.py | 251a664b82e4a813427575f11464018276ab8c9a | [] | no_license | makitsukasa/Stackfu9 | 9d58578cb6e29a945764f388866150742b98ecc3 | 7a7a5b47517eab038a4e76c6ff1bce02ded1e8ac | refs/heads/master | 2020-03-18T14:39:41.417066 | 2018-06-19T17:03:19 | 2018-06-19T17:03:19 | 134,859,565 | 0 | 0 | null | 2018-06-17T07:40:57 | 2018-05-25T13:27:37 | Python | UTF-8 | Python | false | false | 2,493 | py | sf9w2sf9.py | # s f 9w 2 s f 9 .py
# Stackfu9Writable to Stackfu9 transpiler
#
# python sf9w2sf9.py input.sf9w output.sf9
#
# see sf9w.md
import sys
import sf9
sys.path.append('Stackfu9/sf9w2sf9')
sys.path.append('sf9w2sf9')
from immediate_value import solve as solveImmediateValue
from compare import... |
5249e218f81082a41ab7bc81cb2f8a9726caf878 | b45be84be86b989298a7cdb5b461730ea8e528d2 | /python/136.Single Number.py | 6c0cc981f3fa6e9c71c4ae374389e7b17061dd54 | [] | no_license | ayaskovets/leetcode | 75ca7dc4204b313887a2ce7496fe8da48acedf94 | 0244ebf11b61efac3f2b6d0027e00f367dbab4ec | refs/heads/master | 2023-06-06T04:05:35.702579 | 2021-06-18T08:52:38 | 2021-06-18T08:52:38 | 370,071,439 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 184 | py | 136.Single Number.py | class Solution:
def singleNumber(self, nums: List[int]) -> int:
"""
n = len(nums)
O(1) space O(n) time
"""
return reduce(xor, nums)
|
56a4128bea445d199f319c661355418a1aeb9522 | c15e595cc5d3fde81ec0f398b4d58b69eb7e64ee | /OWMapp/apps.py | ebd7718e2573fb3ac0f6afedbeca357bddbee0f9 | [] | no_license | gpcarr/411-project-master | 994e81b8ceccae9904648e1a860f3bd73c2076fc | 5bfb2a4ca4932c3661610a5dfcdc436ff032e7c4 | refs/heads/master | 2021-01-20T00:51:04.600652 | 2017-05-06T02:32:18 | 2017-05-06T02:32:18 | 89,199,401 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 87 | py | apps.py | from django.apps import AppConfig
class OwmappConfig(AppConfig):
name = 'OWMapp'
|
d7427ebb2cd73e53dc9ec60dcb12b4604aefbed0 | b7017ab2b3c299f7d49bd8ebe1abd270cdfb08a0 | /scripts/simulations_nonmatches.py | 2c7e87cdf6c5cf835a13c6e7bda467d5395214c6 | [
"MIT"
] | permissive | neurodata/bgm | c2bbcbf01c2a70f0718daf95a2dbb04409b572cf | 3cc3cac05c8de90c90ec723dd116c83ed812db45 | refs/heads/main | 2023-05-10T16:49:54.239421 | 2023-05-03T15:07:17 | 2023-05-03T15:07:17 | 475,470,258 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 6,378 | py | simulations_nonmatches.py | #%% [markdown]
# # Simulation
#%%
import datetime
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from graspologic.simulations import er_corr
from pkg.io import FIG_PATH, OUT_PATH
from pkg.io import glue as default_glue
from pkg.io import savefig
from pkg.match... |
49c6f87a19544e41c12112e741573a47a7c37efe | 11ab0fe0924a1584dba0177f75195abc224df936 | /widgets/Agenda.py | 5cac29bf13f510a91dd4c0f3cfb6f70259ce9fd5 | [
"Apache-2.0"
] | permissive | markbirss/ePaperWidgets | 76a08317dee7ad037be7526aaf9df4277d0548a1 | 49313cb6734d980bd076385cc51f371797cd7261 | refs/heads/master | 2022-02-17T22:52:14.569734 | 2019-08-21T22:13:45 | 2019-08-21T22:13:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,289 | py | Agenda.py | import sys
import os
import datetime
from dateutil.parser import parse
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
sys.path.insert(0, os.path.realpath('./'))
from display.image_proces... |
ea56e213fb54fa9d34bfff5a54cc8b35093f9702 | 7de1e39801c375847b3ab57c3c61bff95ea9c178 | /library_member/models/library_member.py | 74a3ade41f6575be1d8b32a0595a37b745cbf0c8 | [] | no_license | 709393010/library | d00f45c5fa98a872cf118acd493b570d8f4d6fb0 | f2aab89d9a7e91eec656bc09b0c172c52076e505 | refs/heads/master | 2023-01-22T13:15:37.097921 | 2020-11-26T03:17:33 | 2020-11-26T03:17:33 | 306,898,190 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 685 | py | library_member.py | from odoo import fields, models
class Member(models.Model):
_name = 'library.member'
_description = 'Library Member'
#继承代理:基于已有模型新建一个模型来使用其已有的功能
_inherits = {'res.partner' : 'partner_id'}
date_start = fields.Date('Member Since')
date_end = fields.Date('Termination Date')
member_number ... |
8b2247962e3df38343e1d80dededf4de5743597f | b243ce8a8e4ed5eb299adaa6e95ef8f268ea1744 | /advent/solver/day_1/task_1/__init__.py | a7e1b7db5043c1eb15036680b8bf2189cdb69541 | [] | no_license | LukaszSac/AdventOfCode | b62d26ab62c303abaab26f6b83f591fe9c4beca4 | d8c0438a9a7a47febabb04133800e0abcea35a5f | refs/heads/master | 2023-01-30T00:15:17.206813 | 2020-12-09T21:25:03 | 2020-12-09T21:25:03 | 318,300,208 | 0 | 0 | null | 2020-12-08T19:08:33 | 2020-12-03T19:37:59 | Python | UTF-8 | Python | false | false | 39 | py | __init__.py | from .solver import DayOneTaskOneSolver |
1877634cdd80939be258267dd8a47dc4bf77cf7d | a4df76a93898a73dc3d4ab8a7e7fa9bd65701c94 | /2b.combinefiles.py | 47a455066b0e3bf1b189ce86043ad41084ad2939 | [
"MIT"
] | permissive | JacksonIsaac/REDDprocessor | efa5c5abffdd14bba36e65040fa2eb9f95c4490c | d65be95869432d737b562cd38f7d571d3529e169 | refs/heads/master | 2020-07-09T14:09:51.210955 | 2016-09-14T12:58:00 | 2016-09-14T12:58:00 | 67,241,929 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,056 | py | 2b.combinefiles.py | from itertools import izip_longest
outpath = "redd-main/combined/"
dir = "redd-main/house_1/"
with open(dir+'channel_1.dat') as f1, open(dir+'channel_2.dat') as f2, open(dir+'channel_5_6.dat') as f3,\
open(dir+'channel_6_7.dat') as f4, open(dir+'channel_7_5.dat') as f5, open(dir+'channel_8_5.dat') as f6,\
op... |
c1d399459b4e632759eaeb81998004606c167f1b | 57e87bb9f49b1d6852141e380718530a01664bca | /lib/inference.py | 8df98a3f857f54dd03cc6b89db3cbf735c04347d | [] | no_license | TIXFeniks/babelSolution | 49d9482b051236cba051caf12c7749f65932f266 | 43c6a73dea76aa0b086c140ebd16c5bc2ea63bb0 | refs/heads/master | 2021-03-22T04:42:33.139500 | 2018-02-27T21:36:16 | 2018-02-27T21:36:16 | 116,108,692 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 29,526 | py | inference.py | """
Implements ingraph sampling and beam search for seq2seq models
"""
import sys
import numpy as np
import tensorflow as tf
from lib.utils import nested_map
from lib.tensor_utils import sliced_argmax, is_scalar
from lib.tensor_utils import infer_length, infer_mask
from collections import namedtuple
from warnings impor... |
73d7cb4716d102701104e613c01366a84b33b95d | 5ae8f1ea5082b868749fae4a499f0efc0783da38 | /gasp/photometry.py | bd89499db522cf873a6390fcaa5964b32597c6a6 | [
"MIT"
] | permissive | ixkael/gasp | 9bffbbe17388f076d661f643fc53f95e9ad5f343 | 21dfa3d48569bc1e4e7b5af1108fb0ad7530f525 | refs/heads/main | 2023-08-23T19:53:17.861572 | 2021-10-13T13:06:06 | 2021-10-13T13:06:06 | 300,631,453 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 911 | py | photometry.py | # -*- coding: utf-8 -*-
import numpy as np
def flux2mag(fluxes, mag_zeropoint=0):
"""
Flux to magnitude convertion (arbitrary array shapes)
"""
return -2.5 * np.log10(fluxes) - mag_zeropoint
def flux2mag_witherr(fluxes, fluxerrs, mag_zeropoint=0):
"""
Flux to magnitude convertion (arbitrary... |
80fa823691987c11c74e522d281570b0202690af | 10f11658f692810a18d24137ffd5b4f1a740484b | /train_test_split.py | 6cfad1e7f1c1e6f88314b8716680e87d24a3147f | [] | no_license | jlam55555/naive-bayes-text-categorization | aa8c6d3b5c96513165a14c1231b41d165e8ad9d3 | 4b74b5ce8cc0401c189c435ef78081e51274966e | refs/heads/master | 2023-03-18T18:24:13.102893 | 2021-03-13T09:31:34 | 2021-03-13T09:31:34 | 325,105,424 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,139 | py | train_test_split.py | """
Something akin to sklearn.model_selection.train_test_split, modified for the
purposes of this assignment. Here we don't do any tuning so we don't really
need a tuning/validation/dev dataset, and we only split into train and test
in order to evaluate our performance.
This takes in a training file (*.labels) and spi... |
10f066835faaebfc56b9f1db447124d5bd7556de | e4d12842108f5c9cf95408638cbea5ae56cd14e6 | /pkg9_include/iclda_HTML.py | bd8cb81271969b702e0ca9bf01429d952c952caa | [] | no_license | TinloneX/Learning-Python | 22d6207ad6a20a908b91da7d2bc55eacbfa5e0b2 | b1b6d78915b567e3b69b1639495a44672a3b0ce2 | refs/heads/master | 2021-10-09T20:29:24.596230 | 2019-01-03T07:43:25 | 2019-01-03T07:43:25 | 108,959,913 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,153 | py | iclda_HTML.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from html.parser import HTMLParser
from html.entities import name2codepoint
from urllib import request, parse
# 快速打印
from util import p
class MyHTMLParser(HTMLParser):
def error(self, message):
pass
def handle_starttag(self, tag, attrs): # 不同类型标签有不同的方... |
b1a3873b67964564e790b18d5a0e93b47a7824ad | 9e9cd3309fcf771551d434c624be4bd26f2fcb27 | /streamlit_app.py | 7db1df72b45baec4da72585e7ce3eb967a4d98f9 | [
"Apache-2.0"
] | permissive | tvst/trivial-streamlit-app | b131845f84abcc10f59fb695409fbf8de5c59335 | 556eb1f8080cd909b9ba0516521ec4c9d93db43f | refs/heads/master | 2023-02-13T15:27:30.656357 | 2020-12-28T23:41:04 | 2020-12-28T23:41:04 | 284,876,936 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | streamlit_app.py | import streamlit as st
import sys
"""
# Trivial Streamlit App
This is the most basic Streamlit app _ever_!
"""
v = st.slider("Choose a value", 0, 100)
"You selected:", v, "!!!!"
# Also print to console.
print(f"You selected: {v}")
sys.stdout.flush()
|