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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a87eb679e03f7877eef9e3feb0da72a918be1a8d | 86045083a346c36ff3f811e6bd09df9652410920 | /simple_swarm/city_operator.py | c1c5cd10ddf14fbf66daedf5c5bdcf0ec477ff59 | [] | no_license | jstuartc/Lux_AI | 48b9dc93869c60bb3549ae7d1df0f0c70c386fcb | 0dae525c3e1f4c855c26db07b010d770240e9348 | refs/heads/main | 2023-08-28T09:11:38.826905 | 2021-10-22T11:56:05 | 2021-10-22T11:56:05 | 415,423,240 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 808 | py | city_operator.py | from lux.game import Game
from lux.game_objects import Player
def city_action(game_state: Game, player: Player):
city_list = player.cities.values()
actions = []
actionable_city_tile = []
for city in city_list:
for city_tile in city.citytiles:
if city_tile.can_act():
... |
3ad11f1b6b36064b256e3f54e6dad7f1da7391a9 | 15f87b9bb64c5346e081d1664d3b6e8471bbb984 | /learning/model_baseline.py | fab472e3f96c3f69f03617a48151104329b32a28 | [] | no_license | nikitakit/voxelworld | 756da3b2e4a9bddf105fa1d44c30bdcef2cdac2a | 5766f1052ba072a5e6c7387c319fe665c6b6f67a | refs/heads/master | 2021-01-01T16:58:51.767273 | 2017-11-03T06:51:45 | 2017-11-03T06:51:45 | 97,968,415 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,394 | py | model_baseline.py | """
This is the main model for the "Where is Misty?" task
"""
try:
# This file can be run interactively using Hydrogen
# See: https://github.com/nteract/hydrogen/
import xdbg
INTERACTIVE = True
get_ipython().magic('cd ~/dev/mctest/learning')
except:
INTERACTIVE = False
#%%
import os,sys,inspe... |
3708636fd4cd328cbde2bf7cd6b412b18cf02912 | 850153cd905f0e2de139f2fe65a3a8997f6cd3d8 | /db.py | ff112fe7716ece31bcc007ad57a380204d92aeac | [] | no_license | PotatoMind/bobthekettleserver | 67bcc6949e2e59facb31ee2784e584748c2ba2b4 | 022f7d04d183fb4ad68082567128e473df64cf91 | refs/heads/master | 2023-04-03T17:35:12.447015 | 2021-04-09T17:56:48 | 2021-04-09T17:56:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 469 | py | db.py | import sqlite3
# sqlite db
conn = sqlite3.connect('server.db')
c = conn.cursor()
# Create table
c.execute('''CREATE TABLE IF NOT EXISTS log
(datetime, command, device, response)''')
# Create table
c.execute('''CREATE TABLE IF NOT EXISTS status
(id integer PRIMARY KEY, running integer... |
eb652386ff5ff6c9a5220531d46b85326de71924 | ad7e0e6145da65570951c819365613025f83059d | /src/process.py | b7e4a045dd36826fd9b80da50b57171e1c581bb5 | [] | no_license | milletzcz/CS766-Final-Project | ad4b6f0fd549d4a663703ae13673756a1deea126 | 2b95feb89b9cb8a6f18505519ce61fb7b32727b1 | refs/heads/master | 2022-06-09T08:41:44.288995 | 2020-05-05T00:43:48 | 2020-05-05T00:43:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,828 | py | process.py | import rawpy
import imageio
import numpy as np
import os
from p_tqdm import p_umap
import hsv
import lch
from functools import partial
import errno
def unpack(raw, gain_stops):
"""
Unpack raw data to white-balanced RGB image and relevant color metadata to
transform camera RGB to sRGB
Parameters
-... |
d0507ae7f47e938d12af8dc2cb5431f3da7a8cbd | afbf2211093907830b6d5ab3659621c003be985a | /guessTheNumber.py | 057a24f8c26cd48c1c8967636ececc84e6389b8c | [] | no_license | IuliiaLanchuk/Game_guess_the_number_Python | 1e43f8b8845eb76a7d8179c404de1e8d3fcd1983 | aa7f5a722ab8239568c2ce6d29bc062865a45ea0 | refs/heads/main | 2023-02-06T05:18:14.194395 | 2020-12-29T14:59:20 | 2020-12-29T14:59:20 | 322,824,515 | 0 | 0 | null | 2020-12-19T11:22:39 | 2020-12-19T10:48:41 | null | UTF-8 | Python | false | false | 2,491 | py | guessTheNumber.py | import random
from tkinter import *
# проверка, что введенное это цифры от 1 до 100
def is_valid(num):
if num.isdecimal() and 1 <= int(num) <= 100:
return True
else:
return False
# кнопка Начать игру
def clicked():
lbl.configure(text="Добро пожаловать в числовую угадайку!\n\nЯ уже загада... |
dfe511e5737548556747c9e836feabc06845e8cd | 92669e70eaca8b3fa6f850144a355efcaa0835fe | /src/model/metric.py | 8f3743f64801c1510060cdcb669c8636ff3633af | [] | no_license | yzhangcs/span-based-dependency-parsing | 0e3e96134769995bcca6cda2f33f66e9194b7fbb | d19e06f90852f78500fce887d582b9e33692b22b | refs/heads/main | 2023-07-07T21:44:16.150345 | 2021-08-16T02:31:42 | 2021-08-16T02:31:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,124 | py | metric.py |
import logging
import sys
from asyncio import Queue
from collections import Counter
from queue import Empty
import nltk
import subprocess
import torch
from pytorch_lightning.metrics import Metric
from threading import Thread
import regex
from supar.utils.transform import Tree
import tempfile
log = logging.getLogger... |
eef34e43e4466a00600b1e695be4fc40a1a4dcbf | 65eda6c3625cefe7c92b7f60e90993f34dbd4c92 | /utils/train_cnn.py | db0e33885ef7502cd78829d9fe4cdd2caaa830ee | [
"MIT"
] | permissive | hasan-besh/AdvancedStatInference | 860a2bbdac82adec71ce86a1585b693ae30835f2 | 15d4c3945ec36db9aa0cdf9c09b0237b0ebf4904 | refs/heads/master | 2023-08-10T08:16:16.790304 | 2023-07-19T15:01:00 | 2023-07-19T15:01:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,379 | py | train_cnn.py | from utils import *
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from keras.models import Sequential
from keras.layers.convolutional import Conv2D
from keras.layers.convolutional import MaxPooling2D
from keras.layers.core import Activation
from keras.layers.core import Flatten
from keras.layer... |
ac87b51260f0ddafb1a4bae952eb71db8e453ddd | f3b598b5dab04606e3e01c74d539e189bebb02ac | /intro_to_pandas_1.py | 1287b575e88b5eb721f931de2b352b8638649f88 | [] | no_license | harip/google-ml-course | 30aa43d9b4bd641c1e3a7c7963f4a45983015352 | 6adc71b912ee62bbdbcb7b2bafd94f5d22c2f446 | refs/heads/master | 2021-07-13T21:58:03.675736 | 2021-06-12T18:24:07 | 2021-06-12T18:24:07 | 124,347,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 746 | py | intro_to_pandas_1.py | """Google ML crash course learning exercises"""
import pandas as pd
import numpy as np
CITY_NAMES = pd.Series(['San Francisco', 'San Jose', 'Sacramento'])
POPULATION = pd.Series([852469, 1015785, 485199])
CITIES = pd.DataFrame({'City Name':CITY_NAMES, 'Population':POPULATION})
CITIES['Area square miles'] = pd.Series(... |
631f8804a8406bafd54b3aec9d7bf492d5160958 | b310e5088348af07396a9e65b377d8d80b26ea99 | /Lists/list_of_string.py | a748ec26e0b218049a17c2497e3ae573c73d0609 | [] | no_license | rajeshvermadav/XI_2020 | adc14c0829662539ebf376267fc105712beef640 | 9ba6d0afa7bd8af49bf31ed647840976080e419e | refs/heads/master | 2023-01-19T09:52:04.691236 | 2020-11-23T14:35:18 | 2020-11-23T14:35:18 | 287,901,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | list_of_string.py | str_lst = input("Enter a list of string:-").split()
#t = len(str_lst)
if len(str_lst)>0:
t=0
for i in str_lst:
if len(i)>t:
t = len(i)
print("The length of the largest string is:-",t)
|
e345dfe216de8250b37cc88c159c25503c005c38 | 1d3ca5b638feb74bc4b1193971984eeacccaa841 | /python/utils/maxLocation.py | 6080a8153faa8256d536934b680c69cb572f187c | [
"BSD-3-Clause"
] | permissive | rep-ai/c2f3d_pose | fc4e42133a39fe9fd5da36144802fbf0eb6dc9f1 | a2db5afcd22c584c41df67d156ea55e27bce9534 | refs/heads/master | 2020-03-15T12:36:48.801807 | 2018-05-04T14:20:14 | 2018-05-04T14:20:14 | 132,148,022 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 143 | py | maxLocation.py | import numpy as np
def maxLocation(preds,bbox,dims):
deltaX = (bbox[2]-bbox[0]+1)/dims[0]
deltaY = (bbox[3]-bbox[1]+1)/dims[1]
W
return W |
1f3fb1f322987c76ab2ad3d8a05c2e195791e05b | 9dab361caa877ecf698c1eafe1975c4ebaeff90d | /201501142_Labdhi_Shah/Assignment 4/rating_normalisation.py | 389a7bf2863b8ffa55c7ea29e5282119316c9523 | [] | no_license | labdhi2710/IT562_Team404_DA-IICT | 2932bd5e00fbe8fcfee5d35c5b2b31da64fd5d57 | 0a205c6ffd75be8f06531c1e9b1223b5f9e040a8 | refs/heads/master | 2021-05-11T07:08:18.614339 | 2018-05-05T19:50:17 | 2018-05-05T19:50:17 | 118,009,169 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | rating_normalisation.py | import csv
out=open("ratings_woheader1.csv","r")
data=csv.reader(out)
data=[[row[0],row[1],eval(row[2])] for row in data]
out.close()
#print(data)
normalised_data=[[row[0], row[1], row[2]/5] for row in data]
#print(normalised_data)
out=open("small_normalised_ratings.csv","w")
output=csv.writer(out)
... |
575d992b5fbd25636117f32e3272cc712cf2facc | be4f4362cca2761706e0b23321f7c456f78e49fc | /Reverse Middle Words in a String.py | 863296856506c6c5f3084448a3cb09249ebeae47 | [] | no_license | Suhail727/GeneralProgramming | 8947ded48c970fa8975445523c42e1d0371d0c44 | 80fb482960f5bd1cdace78b552d3cd08a914bd72 | refs/heads/master | 2021-11-28T07:12:51.198277 | 2021-10-06T15:38:17 | 2021-10-06T15:38:17 | 167,709,868 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 384 | py | Reverse Middle Words in a String.py | def printReverse(s):
#Taking all the words in a list
l = [s for s in s.split(' ')]
#printing the first word as it is
print(l[0], end = ' ')
for i in range(1, len(l)-1):
#printing middle words reversed
print(l[i][::-1], end = ' ')
#printing the last word as it is
pri... |
2a6e0fe3625aebd1bf7270d673d11568629d3aeb | 41336c9b9df4eac682a4780f5393c68440813d1c | /backend/app/app/tests/api/api_v1/test_user.py | 07ccf35a944eb459cd8415e42d04fe2aa8d7ccc8 | [] | no_license | SirNicolas/billing | c1286612b487151c4f9a31e780ab41698732dbcf | f576fe5ceae935de1c854810a361169ae38a81e7 | refs/heads/master | 2023-03-05T17:16:30.534514 | 2021-02-19T22:09:11 | 2021-02-19T22:09:11 | 340,500,796 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,621 | py | test_user.py | from typing import Dict
from fastapi.testclient import TestClient
from sqlalchemy.orm import Session
from app.core.config import settings
from app.common.user import crud, schema
from app.tests.utils.utils import random_email, random_lower_string
def test_whoami(
client: TestClient, user_token_headers: Dict[... |
41f10d08431ef0f209e02073d2b653858ee99eab | 29ca165f964258609a449faf6612e356d5f9f230 | /Gotta Catch 'Em All.py | 31e5f933f83ad016faa75b155ec96b306a0e7434 | [] | no_license | divanshu79/hackerearth-solution | a94b7dfb36e36c032741fb563dcf54a746b6d991 | dd8e9341583ad0309d2a6727381edb814fcf1e78 | refs/heads/master | 2020-03-25T07:56:36.200247 | 2018-08-05T06:46:09 | 2018-08-05T06:46:09 | 143,589,682 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 422 | py | Gotta Catch 'Em All.py | t,n = list(map(int,input().split()))
d = {}
x = n
s = {}
for i in range(1,x//2+1):
s[i] = 0
s[1] = 1
for i in range(1,x+1):
d[i] = 1
for i in range(2,x+1):
count = 0
for j in range(1,i//2+1):
if(i%j==0):
count += 1
d[i] += count
s[count+1] += 1
#print(d)
#print(s)
for _ in range(t... |
ecca9b488c5883a8b054378304f7aecca895c89b | fc90580b0259a20b1e17f5218e00c27fc0ca192a | /study_homeworks/hyunjae/blindTest/2018 Kakao blind recruitment/level2/Exercise05_compression.py | 2b1453e19e30913c1b0dac1fa3d87d4dbd5eb5fb | [] | no_license | pjjoy/python | 1ca0bc8c10cfb7537f5db559233936424e8cc7f8 | 66f9c212f129eb1979c8f03df401ea19dc388468 | refs/heads/master | 2021-05-26T04:09:48.949365 | 2021-04-28T13:27:18 | 2021-04-28T13:27:18 | 254,047,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 754 | py | Exercise05_compression.py | def solution(msg):
answer = []
msg_dict = {}
index = 0
#A~Z 딕셔너리 추가
for i in range(26):
msg_dict[chr(i+65)] = i+1
new_index = 27
while index != len(msg):
a = 1
while msg[index:index+a] in msg_dict.keys():
if index + a > len(msg):
break
... |
1f49415e660ddd03b1f059b35e404d599459255f | 4ec28eb34b0dc156b1a9daa44a32ebc94cd6f0d1 | /rizwandevinterviewproject/articles/migrations/0012_article_pitch.py | 6549d6573276ab81f9210756222f8cb90bc81ab1 | [] | no_license | rizwanc/rizwandevinterview | a232097bfcdc2583e263ca79007bfb8a0f837da1 | 585f136d7020599124e767f12bd5df15b4cba352 | refs/heads/master | 2022-01-22T05:18:39.283459 | 2019-07-24T23:55:25 | 2019-07-24T23:55:25 | 198,116,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 470 | py | 0012_article_pitch.py | # Generated by Django 2.2.3 on 2019-07-24 11:32
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('articles', '0011_auto_20190724_0724'),
]
operations = [
migrations.AddField(
model_name='article',
... |
6acbef73bbb6fc0eb324c9882ff3d490358a5d25 | e5475445144cb000c0c71669e9cf8ca8627212b6 | /Code projects/Gametags/website/admin/views.py | 813b962cd69839db5101c02825ef619f9f32cb68 | [] | no_license | Eldfly/Python-Projects | 352d3b303de2fa7237d1c5cab3c7490ead32f788 | 63417b0973a1b1658ce4ef4a4a2f3c130fe05a62 | refs/heads/master | 2022-11-23T08:00:22.479903 | 2020-07-19T12:56:53 | 2020-07-19T12:56:53 | 265,606,564 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,357 | py | views.py | from flask import render_template, url_for, flash, redirect, request, Blueprint
from website.admin.forms import CreateGameForm
from website import db
from website.models import Games
from website.admin.picture_handler import add_game_pic
admin = Blueprint('admin', __name__)
@admin.route('/admin_home')
def admin_home... |
43d120fbaa1f5650e940104fcf44325e46ad18d6 | b2b40bfb0a6a6b0899f5185be165e6907abf0b27 | /Paper-codes/HT-iML_photocatalysis/make-struct-cn.py | 51ab411b47509a62cbf875783400d6c37e1baafa | [] | no_license | ritesh001/Related_to_research | 00d0f45fd5943811e2de9203981e5abe978c415d | 310876da18e20b3a60639d730b6e40ff848576eb | refs/heads/master | 2023-04-13T05:30:47.269278 | 2023-04-02T09:33:36 | 2023-04-02T09:33:36 | 78,549,166 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,795 | py | make-struct-cn.py | #!/usr/bin/env python
import warnings
warnings.filterwarnings("ignore")
from pymatgen import Element
from pymatgen.io.vasp.sets import MPRelaxSet
from pymatgen.io.vasp import Structure
import os, shutil
from ase import Atoms
curr_dir = os.getcwd()
cl = Atoms('Cl')
br = Atoms('Br')
iod = Atoms('I')
fl = Atoms('F')
cn... |
def00a87e033b9467b7185f95c3c4d24ef84ee36 | 78642c29b3f75c2bbc59efffe6b0fdd81c8f287f | /dice.py | 50ac82bc4923e80806dc9bee8ff061e0ba7597b0 | [
"CC-BY-3.0",
"BSD-2-Clause"
] | permissive | andyfaff/dice-roller | 103bbdf2999db4abfd028b2744d1bc2a95284783 | afac42bdd90a04e9169874124ab9f1357d980c6b | refs/heads/master | 2020-12-30T15:29:08.888045 | 2017-05-13T01:24:36 | 2017-05-13T01:24:36 | 91,141,012 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,104 | py | dice.py | import sys
import os.path
from random import randrange
from PyQt5.QtWidgets import QDialog, QApplication
from PyQt5 import uic
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtGui import QPixmap
class DiceWindow(QDialog):
def __init__(self, parent=None):
super(DiceWindow, self).__init__(parent)
sel... |
d8a4b9e10faf2d6a29f478621babc37f4613b3c1 | 524c0d4a584caef20abc6745037e100a2a0c0655 | /transpositionEncrypt.py | df24150c8eff3218e76733ba1309d30f489ba49c | [] | no_license | Anthem9/CTF_Crypto | d26d4fe8ee99893e460ad68e17e18e4b54fb2555 | de55e27fc1b371f3462bd1c32920aab440ef1958 | refs/heads/master | 2021-05-01T06:04:19.556653 | 2018-02-11T15:09:40 | 2018-02-11T15:09:40 | 121,135,226 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,338 | py | transpositionEncrypt.py | #Transposition Cipher Encryption
import pyperclip
def main():
myMessage = 'Common sense is not so commen.'
myKey = 8
ciphertext = encryptMessage(myKey, myMessage)
print(ciphertext + '|')
pyperclip.copy(ciphertext)
#把加密之后的文字复制到剪贴板
def encryptMessage(key, message):
ciphertext = [''] * k... |
a045423edd94d985dfc9660bcfe4a88c61bf4574 | 8746b28e23a9a4533b3a049d355a302697bd4c54 | /subtraction.py | f5651a33d17a182633bdd50dea8db02629677d2d | [] | no_license | jiten04/python-programs | 968452a322dc061d02bfda6b6030979c7a63b13b | b2af3350cbf7de77bd754993245742dd98a386e2 | refs/heads/master | 2020-03-22T11:54:04.262479 | 2018-07-06T16:09:50 | 2018-07-06T16:09:50 | 140,003,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 117 | py | subtraction.py | #Script start
print"This is the two number subtraction python program."
a = 9
b = 2
c = a - b
print c
# Scrip close
|
13c9f0f58ec6da317c3802f594bb0db7c275dee9 | 109b67763d4f766901d8eb2a95eb076b4759fe83 | /Classifying dogs vs cats with our own data images.py | 34e41b780d5cbcb8fe418049f29325e2911b11de | [] | no_license | Ramstein/PadIN | 6ec984130d89d295b533dd539c5e2394bc5296e5 | 73eb9d53997fdd7e21ec41b769f0d0d25ab573de | refs/heads/master | 2023-07-15T19:03:41.906563 | 2021-09-07T18:03:41 | 2021-09-07T18:03:41 | 404,076,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,830 | py | Classifying dogs vs cats with our own data images.py | '''
!pip install wget
from zipfile import ZipFile
import wget
print('Beginning file downlaod with wget module')
url = 'https://download.microsoft.com/download/3/E/1/3E1C3F21-ECDB-4869-8368-6DEBA77B919F/kagglecatsanddogs_3367a.zip'
wget.download(url, 'sample_data/')
print('2. Extract all files in ZIP to different dir... |
95c5971a102fb2ed84ab0de0471278d0167d8359 | 2f8959e8f15e376bb658077c6b4e8912d78c3b4e | /0x07-python-test_driven_development/2-matrix_divided.py | dd71b632c9503c17fb851f2fe52ebc906b4436a9 | [] | no_license | JHS1790/holbertonschool-higher_level_programming | 528b25dce2f625251591cd88dfeb2b29fcb203c2 | 17d3aa0db98df919391d4082f4c15bb1b83deed8 | refs/heads/master | 2023-03-01T05:47:52.586086 | 2021-02-11T18:40:45 | 2021-02-11T18:40:45 | 291,751,983 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,990 | py | 2-matrix_divided.py | #!/usr/bin/python3
"""1. Divide a matrix """
def matrix_divided(matrix, div):
"""Divides a Matrix
Args:
matrix: A list of lists of ints or floats
div: a non zero int or float
Exceptions:
TypeError: if the matrix and/or div is not as stated or the matrix elements
are not of the... |
5fb998fa761b989c6dd423634824197bade4f8a5 | 08fab07c18a506c7b966c8c8f2b1124e68122a38 | /hackerrank/preparation_kit/dynamic_programming/abbrevation.py | 773f3a3e711c26733333879daafc9a23bd32e7c1 | [] | no_license | vitthalpadwal/Python_Program | 987d9350030a321ee424e50890b6914fc0bda0aa | 30539019e46c8bf19b88c492e5df995653a30e3e | refs/heads/master | 2021-01-12T07:32:45.713054 | 2019-10-09T14:57:38 | 2019-10-09T14:57:39 | 76,968,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,352 | py | abbrevation.py | """
You can perform the following operations on the string, :
Capitalize zero or more of 's lowercase letters.
Delete all of the remaining lowercase letters in .
Given two strings, and , determine if it's possible to make equal to as described. If so, print YES on a new line. Otherwise, print NO.
For example, give... |
5ed439a2a7cfb9c941c40ea0c5eba2851a0f2855 | 3f2bd85c2eac322b1f1ce959e99c2517f12e7510 | /LinkedLists/super_stack/stack.py | 906ea1fe57db04bf43ced8ebe9ba1fa1760807f9 | [] | no_license | knparikh/IK | 38cb256c5773b7decd57e863bb37c9b7cdb9c3f3 | 65f554a685e83e1c025ba60d008bc5dfb71e3192 | refs/heads/master | 2021-04-09T16:36:13.264154 | 2020-02-10T17:29:59 | 2020-02-10T17:29:59 | 125,804,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,333 | py | stack.py | #!/bin/python3
# Implement a stack with push, pop, inc(e, k) operations
# inc (e,k) - Add k to each of bottom e elements
import sys
class Stack(object):
def __init__(self):
self.arr = []
def push(self, val):
self.arr.append(val)
def pop(self):
if len(self.arr):
return... |
39f9341313e29a22ec5e05ce9371bf65e89c91bd | 2a979b2dfc1e9bce8d93fb8c2d219c0122e50b66 | /codingdojang_LV2/최빈값 구하기.py | d40cd362ad995126787ee7c58089af507307061e | [] | no_license | JohnHamm0nd/algorithm | 8b1bf1b58790da0b8c6482b6ce068fd29316a374 | 13c00cbc270cc197327e97f61f7d2ed80dc81358 | refs/heads/master | 2020-07-07T07:43:04.523954 | 2019-11-07T02:54:55 | 2019-11-07T02:54:55 | 203,294,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,032 | py | 최빈값 구하기.py | """
리스트에 있는 숫자들의 최빈값을 구하는 프로그램을 만들어라.
[12, 17, 19, 17, 23] = 17
[26, 37, 26, 37, 91] = 26, 37
[28, 30, 32, 34, 144] = 없다
최빈값 : 자료의 값 중에서 가장 많이 나타난 값
① 자료의 값이 모두 같거나 모두 다르면 최빈값은 없다.
② 자료의 값이 모두 다를 때, 도수가 가장 큰 값이 1개 이상 있으면 그 값은 모두 최빈값이다.
"""
n_list = [[12, 17, 19, 17, 23],
[26, 37, 26, 37, 91],
[28,... |
312cc666c88fcd22882c49598db8c5e18bd3dae1 | d6f8786e77797f0126a0fdf7e73743cef8c542a7 | /setup.py | 1e3a639babc862f3d8622a524f9a49c0173a0746 | [] | no_license | fonzo14/sent2vec.py | fb82232a1392809a2bab7fc99ea3b6f57b05bfb6 | 1f890c752268e6fd36aee861266695cb5663e191 | refs/heads/master | 2021-08-24T17:54:27.420277 | 2017-11-21T09:32:08 | 2017-11-21T09:32:08 | 110,996,745 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,983 | py | setup.py | from setuptools import setup, find_packages
from setuptools.extension import Extension
from sys import platform
cython = True
try:
from Cython.Build import cythonize
cython = True
except ImportError:
cython = False
# Define the C++ extension
if platform == "darwin":
extra_compile_args = ['-O3', '-pthread',... |
2aec0581413d4fb0ffb4090231fde0fed974bf18 | 75530771c6f92468abf50dc8dca7ee404367bdd6 | /data/gen_fake_st.py | 5cba8e10777f3f6abc4fbaa269cfd0de04dab504 | [] | no_license | Doken-Tokuyama/gpt2_finetune | b0671cbb56afd449f313d52666a05a169250b204 | d2a56713715ed2df00cd7e1ab49d187a08c04193 | refs/heads/master | 2022-10-31T21:04:39.887164 | 2020-06-19T06:50:27 | 2020-06-19T06:50:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,982 | py | gen_fake_st.py | import numpy as np
import random
with open("./roc.txt", "r") as fin:
with open("./roc_shuffle.txt", "w") as fout:
tmp = []
for k, line in enumerate(fin):
i = k + 1
if i % 6 == 0:
idx = [0] + np.random.permutation(range(1,5)).tolist()
for sen i... |
4f13e2858d9cf469f14026808142886e5c3fcc85 | 16cec617c5542ecc1d6006435302c63a6f0b2b53 | /Merge_Sorted_Array.py | 03e7f4fbec34c16201e951778fc82f9b2238e6e2 | [] | no_license | annahung31/LeetCode_practice | ef2a684461853cbd50bc62099bd9d8b929a9faa1 | 94ac5f97156bd40e3d4c87f18e9b149d45aaf2dd | refs/heads/master | 2023-08-15T18:32:10.595862 | 2021-09-19T13:39:36 | 2021-09-19T13:39:36 | 286,256,885 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,106 | py | Merge_Sorted_Array.py | class Solution:
def merge(self, nums1, m, nums2, n):
"""
Do not return anything, modify nums1 in-place instead.
"""
if n == 0:
nums1 = nums1
if nums1[m-1] <= nums2[0]:
for i in range(n):
nums1[m+i] = nums2[i]
... |
57967f36a45bb3ea62708bbbb5b2f4ddb0f4bb16 | 00aa625b7ddf9c14ad1baa6e30c8cc4c7bd83b00 | /chf/cached_templates/templates/account.rentalcart.html.py | 7220ac52df110038a5de35c9dff6e631061f18af | [] | no_license | codycolson/INTEX | 4f3210e95c4810744578e9b849bb7efe8eeff01d | b8dda9aae03ee15ef18e7270c9b7f214c1d03042 | refs/heads/master | 2022-11-25T14:33:08.282017 | 2015-04-10T03:06:25 | 2015-04-10T03:06:25 | 33,561,603 | 0 | 1 | null | 2022-11-22T15:56:15 | 2015-04-07T18:46:19 | Python | UTF-8 | Python | false | false | 4,385 | py | account.rentalcart.html.py | # -*- coding:ascii -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 10
_modified_time = 1428612037.145222
_enable_loop = True
_template_filename = 'C:\\Users\\Cody\\Desktop\\Heritage\\chf\\templates/account.rentalcart.html'
_t... |
2a8d1809dbb123ce8f9e292c5f223379c1629ee0 | 5284c8052948dc42ca22464e2f832b83e6dd3d9f | /spotifyOauth.py | 543442fde1cfbc95147bfb1154c2a5cec37a584f | [] | no_license | arnguyen/SI206-FinalProject | e6ec695382dc3ca18eb6b4d45cbbc5ecae7725e7 | 54e0fe88a027b6d3608ef544a320ea7110de49d1 | refs/heads/master | 2020-09-24T07:50:21.573350 | 2019-12-19T18:58:58 | 2019-12-19T18:58:58 | 225,706,337 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,540 | py | spotifyOauth.py | from bottle import route, run, request
import spotipy
from spotipy import oauth2
import requests
PORT_NUMBER = 8080
SPOTIPY_CLIENT_ID = 'df18e7063143495994aae82d0aea9708'
SPOTIPY_CLIENT_SECRET = 'da3d58de003f4c61aabaa192aaa2c102'
SPOTIPY_REDIRECT_URI = 'http://localhost:8080'
SCOPE = 'user-library-read'
CACHE = '.spot... |
1a1fd31a026a6e97812d787db96b7601dec6ede2 | 97b34f867ea55ec94fedacba9faa9ef5550b0638 | /datastores/queue.py | a0b303f1d26241ebee461c29ec3fad33087e1588 | [] | no_license | MUGABA/dataStructures-js | f80d566e778151daf994b5c1a4adbad670a7193c | b8a70b5aace3b5d172d2936ea0211e8d9eecbd09 | refs/heads/master | 2020-12-26T07:36:57.943485 | 2020-01-31T13:37:33 | 2020-01-31T13:37:33 | 237,435,383 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 281 | py | queue.py | class Node:
def __init__(self, value):
self.value = value
self.next = None
class Queue:
def __init__(self):
self.first = None
self.last = None
self.size = 0
def enqueue(self, val):
node = Node(val)
print(node)
|
32f613ace2f4746d280694a5c290b7c9545ae4a3 | 663d7b5ab92213aa1d7fc6c3af4f7d2c57b55434 | /Guru99Bank.py | 52931ef7086258d34c126f78abb97c56af06cdae | [] | no_license | berlioz458/pythonTest | 1cd184f0f8bcde6e49dfa2ea7f6cb5bf175c3c6c | 674c8341541087487a36df3b5017b935978d8695 | refs/heads/master | 2020-06-06T09:19:27.945258 | 2019-06-26T02:54:42 | 2019-06-26T02:54:42 | 192,699,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 474 | py | Guru99Bank.py | from selenium import webdriver
browser = webdriver.Chrome()
link = "http://www.demo.guru99.com/V4/"
browser.get(link)
userID = "mngr204244"
Password = "amadAnU"
userIdInput = browser.find_element_by_css_selector("[name = \"uid\"]")
userIdInput.send_keys(userID)
passwordInput = browser.find_element_by_css_selector(... |
c5d2fd9de6be54e2fe81c70e2d308a1c3d3d4e49 | 6caa48e9fdaa2d2e1f623b3312853d07402ec7cd | /warehouse_utilities/warehouse_constructor.py | cfbfbae14153c0da7176d482b6c38c73ce00fe8b | [] | no_license | Supply-Chain-Gang-2/warehouse-tracker-back-end | fb127692c866b41c3a70ffcfd5a3be1f6b335b16 | 132b29978f70b8f0c1d93ee91977aae296da3473 | refs/heads/main | 2023-07-05T18:25:23.256746 | 2021-08-23T17:49:02 | 2021-08-23T17:49:02 | 387,530,844 | 1 | 1 | null | 2021-08-23T17:49:02 | 2021-07-19T16:37:26 | CSS | UTF-8 | Python | false | false | 4,804 | py | warehouse_constructor.py | import numpy as np
import pandas as pd
from .df import DataAnalytics
class WarehouseConstructor:
"""the Warehouse class represents a physical warehouse. it contains the measurements of the warehouse, including dimensions, walking lane space,
the specs of the shelves, the available grid spaces in which to put ... |
86dc56c109cd6be8e0b046cca2582f0e36a8b99b | 35d812a2d2f9d76ea945d0a5e79dca9ff85432f2 | /modules/WebExtract.py | a1575fdb056f421a3078dd3007f2ab2269fe05e1 | [
"MIT"
] | permissive | BhasherBEL/LittleFather | b4bc06ff95d0c8dc216fb4e10c8c84eafa6331b9 | 2ad4d8fcd05d33414c2ad4ce065330137587145c | refs/heads/master | 2020-07-11T12:13:30.719545 | 2019-08-31T22:33:15 | 2019-08-31T22:33:15 | 204,536,061 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,523 | py | WebExtract.py | #!/usr/local/bin/python
# coding: utf-8
name = 'WebExtract'
version = '1.0.0'
author = 'Bhasher'
requirements = ['selenium', 'os', 're', 'time']
cache = {
'websites': {},
'outputs': {},
'analyse': {
'emails': []
},
}
class Website(object):
success_class = None
name = None
version = None
author = None
cont... |
02d30c92da9863a251aadabdff075668f4209d4f | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_199/155.py | 42b686ff361a85b045ce4a71b055bb05b51062dc | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 493 | py | 155.py | def flip(s):
if s == '+':
return '-'
else:
return '+'
def solve():
S, K = raw_input().strip().split()
K = int(K)
S = list(S)
n = len(S)
count = 0
for i in xrange(n):
if S[i] == '-':
if i+K > n:
return "IMPOSSIBLE"
for j i... |
4b9516e80337bd7a09d78fc85b09fe354cb2fd64 | b9db9368267ba41471c9a31743f8fe9209cdedb0 | /cnblogs/spiders/news_spiders.py | d644039ea9af2f1cc78e34f41b29a8e68704490b | [] | no_license | ActStrady/cnblogs | fe789383a02fa59c78d11cb8b81840109cdfdcb6 | cc19997b88672eefe817912fd4861f6232354386 | refs/heads/master | 2020-05-29T12:49:39.139567 | 2019-05-29T03:32:06 | 2019-05-29T03:32:06 | 189,140,673 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,737 | py | news_spiders.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @Time : 2019/5/28 15:42
# @Author : ActStrady@tom.com
# @FileName : news_spiders.py
# @GitHub : https://github.com/ActStrady/cnblogs
import re
from scrapy import Spider, Request
from cnblogs.items import CnblogsItem, NewsDetailsItem, NewsCommentItem
from selenium import... |
5129b4f1df3711051fb66d5bf4051d437048e541 | 5cf9118fc9c74a174a101c7fa35e04e7f24ad6f4 | /src/models/GraphCNN_VAE.py | 7a6f186cc6a6a191f280b89cbfe6ce7094a2324f | [] | no_license | crisz/point-cloud-reconstruction | 67ad675c0d5df6dfc33f3c1c461c509fd8a128e2 | 56343aa8c3a2e1ac9d0f298f4fdb789c3a3e376c | refs/heads/master | 2023-08-19T13:22:17.590078 | 2021-09-16T09:20:15 | 2021-09-16T09:20:15 | 366,183,824 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,478 | py | GraphCNN_VAE.py | import torch
from torch import nn
from config import config as cfg
from decoders.decoder import Decoder
from encoders.graph_cnn_encoder import DGCNN
import torch.nn.functional as F
class GraphCNN_VAE(nn.Module):
def __init__(self, num_points=1024, feature_transform=False, alpha=1):
super(GraphCNN_VAE, sel... |
e81712f00325b3c2ddaa348d656478cd8b27606d | 7e7fdcb8a23c68f1c8750d76d210812c79489a67 | /testproject/mkl/views.py | 09a22a07d70857a08575b5031a7069bb9b061d2b | [] | no_license | suyashsachdeva/Django | b0980aa278577d6b79fd7401bf31c985f0949888 | 5c9f5738e84d93690c3c0a61948c79f126aecd0c | refs/heads/main | 2023-06-19T14:20:53.446717 | 2021-07-22T15:11:13 | 2021-07-22T15:11:13 | 388,054,577 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 597 | py | views.py | from django.http import HttpResponse as hp
from django.shortcuts import render
# Create your views here.
def home_view(request, *args, **kwargs):
print(args, kwargs)
print(request.user)
#return hp('<h1>HOME</h1>')
return render(request, 'home.html', {})
def info_view(request, *args, **kwargs):
#r... |
bc82b3975647ea4b1b426c68fe8d0ec7084131ed | 01cf18ccfb5655e3291bf589cf241ba575b09076 | /budget/forms.py | 9e1da07a6ed4af67ea09c1e7eda82f32b95953a8 | [] | no_license | sharonmatan/Smart-Budget | d80b995cf6bed3f794eb0496e55c707c1883c19b | 8a2c1c970846eb1a91e4d42316f281e34a76e28e | refs/heads/master | 2021-03-26T14:02:42.601830 | 2020-03-16T14:17:25 | 2020-03-16T14:17:25 | 247,710,393 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | forms.py | from django import forms
from . import models
# from django.forms import DateInput
class ExpenseForm(forms.ModelForm):
class Meta:
model = models.Expense
fields = "__all__"
class IncomeForm(forms.ModelForm):
class Meta:
model = models.Income
fields = "__all__"
class GoalFor... |
e3b407a4fa94ce0ed6eeb06db5c75862ac0b653f | ca3e53352c858eb52886b6155c191071ec2e8aac | /docs/source/conf.py | 2d07fcfc5bfa97344f83a841061f8459b0181c96 | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license"
] | permissive | etaler/Etaler | e6209fc58f92e3150eb7a59a806493fabeef2d5c | 1670b1a0ede9dfa3891e85473b0c0b70500ca138 | refs/heads/master | 2023-01-28T04:25:54.244973 | 2023-01-22T04:07:43 | 2023-01-22T04:07:43 | 186,663,903 | 92 | 17 | BSD-3-Clause | 2021-12-16T00:36:18 | 2019-05-14T16:52:14 | C++ | UTF-8 | Python | false | false | 913 | py | conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import subprocess
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
#if on_rtd:
# subprocess.call('cd ..; doxygen', shell=True)
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
def s... |
1a2f507387737b3d8ab4598643bea6985ff58b05 | dfab789887e6447666caad6ac36a16578da06dfc | /DQN.py | cdd59e3ba81cbc3f3233e48eef8f95d65ea467b5 | [] | no_license | leon2401119/Freeway_DQN | 0fb5cef06342509cc2bb5a74d751fdafec7846ea | 34b1dc46a15206ebe1e26292cb5ca4a601bbf39f | refs/heads/master | 2022-11-07T10:01:31.683264 | 2020-06-18T08:03:50 | 2020-06-18T08:03:50 | 273,178,026 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,856 | py | DQN.py | #!/usr/bin/python3
# coding=utf-8
##############################################################################################
#
# NCTU Deep Learning HW3
# Author: YANG, SHU-HSIANG
# Date: 2020/05/24
#
# ★ Refer to https://github.com/CharlesYSH/DQN_freeway and you can also get the colab notebook
#
# ★ If you think ... |
0541a2ca82f6b32f7cbde69ed2d90bb64ad95154 | 22040f35f36ca6b93de0b6418ec8ec9584214c57 | /pw_salt_test.py | 4d5f3ce9ed2118e4323158a81b3edbfbff44fe10 | [] | no_license | WinonaCS485/store-a-password-in-the-database-alexanderDSchneider | 70e3499ab7e060e4f2e3df38dcf60b7f48e12eb9 | ddb42eb618590d76e4a115067bd864303ce096a8 | refs/heads/master | 2020-12-28T09:52:29.546167 | 2020-02-10T18:22:19 | 2020-02-10T18:22:19 | 238,276,905 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,988 | py | pw_salt_test.py | import uuid
import hashlib
import pymysql.cursors
def send_to_db():
new_user = input('Enter a user name: ')
new_pass = input('Enter a password:')
salt = uuid.uuid4()
salt = str(salt)
to_encode = new_pass + salt
user_hash = hashlib.sha256(to_encode.encode())
print(user_hash)
connectio... |
75cf1a747841188f02740da40fb6aadbb5d15fac | 480b954c39a4219b8f37e2f739ebd193ca42ce5a | /python/Activity15.py | 945d0f0c3075eb8a2f0d5b2e5068153a3a5b1e45 | [] | no_license | tannushree004/sdet | 6f67ec39fd58de630ed0886891bde7dbcfb17908 | 25a4fff86c8caa302f5260efd798423f3c55fa8c | refs/heads/main | 2023-03-08T22:38:22.042508 | 2021-03-12T20:19:24 | 2021-03-12T20:19:24 | 326,886,131 | 0 | 0 | null | 2021-01-05T04:30:18 | 2021-01-05T04:30:18 | null | UTF-8 | Python | false | false | 146 | py | Activity15.py | try:
print(invalidvariablename)
except NameError:
print("Variable name was not defined")
finally:
print("printing Finally block") |
333dd28231b4bea92e00437442a4681afb98a586 | 93ed8afd9b974fff39be2c897ef82c7df00093d1 | /infoupdate/views.py | 434680fd893a03ad492b3ade2f3a2dc46e39c1cc | [] | no_license | ChristopherC027/dbcr_api | f8ddb1888be865e137262c8512b20822d920191c | 5c75268d30b6fecfe0311cbc7b8d849f43577e21 | refs/heads/master | 2023-02-13T13:49:57.319542 | 2021-01-16T17:25:56 | 2021-01-16T17:25:56 | 326,553,015 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | views.py | from django.shortcuts import render
from rest_framework import generics
from .models import Info
from .serializers import InfoSerializer
class InfoList(generics.ListCreateAPIView):
queryset = Info.objects.all()
serializer_class = InfoSerializer
class InfoDetail(generics.RetrieveUpdateDestroyAPIView):
q... |
6ae321df414fa11ee0bed9f6eaf7e0c1706487cd | 929fbe2925a9a05684e9c613857c78f536f28c8b | /0.4.x/captcha/ShareonlineBiz.py | c7c9d472b679b4c1c694d63ea40d8b9c4e2e0459 | [] | no_license | gitter-badger/plugins-3 | 8c9152f439c347071f7803df57d2e837981ae21c | cb2667d93ba0b4d769881b20ecb307580f1b34f3 | refs/heads/master | 2020-05-27T22:20:35.490275 | 2017-03-01T15:12:09 | 2017-03-01T15:12:09 | 83,589,948 | 0 | 0 | null | 2017-03-01T18:58:59 | 2017-03-01T18:58:59 | null | UTF-8 | Python | false | false | 871 | py | ShareonlineBiz.py | # -*- coding: utf-8 -*-
from ..internal.OCR import OCR
class ShareonlineBiz(OCR):
__name__ = "ShareonlineBiz"
__type__ = "ocr"
__version__ = "0.16"
__status__ = "testing"
__description__ = """Shareonline.biz ocr plugin"""
__license__ = "GPLv3"
__authors__ = [("RaNaN", "RaNaN@pyload.org")... |
2ada3aafbc11d4f4ac573bbcd51fe62ebfce3e16 | ebbc32882b1bbb6e6935695a400e8ffd8c0fb7f6 | /ROAR/agent_module/legacy_agents/mpc_agent.py | 7f13b5bbd6187fa319dd9a5310c664a01dc546de | [
"Apache-2.0"
] | permissive | augcog/ROAR | 25fc3555934854871883de84bae49d84f86fbd7b | b7cd322f451ceccf5c53b331e15f5025f2e63bac | refs/heads/main | 2023-08-31T16:51:00.857463 | 2023-08-12T00:08:06 | 2023-08-12T00:08:06 | 302,450,761 | 29 | 222 | Apache-2.0 | 2023-08-26T07:04:26 | 2020-10-08T20:10:20 | Jupyter Notebook | UTF-8 | Python | false | false | 2,377 | py | mpc_agent.py | from ROAR.agent_module.agent import Agent
from pathlib import Path
from ROAR.control_module.mpc_controller import VehicleMPCController
from ROAR.planning_module.local_planner \
.simple_waypoint_following_local_planner import \
SimpleWaypointFollowingLocalPlanner
from ROAR.planning_module.behavior_planner.behavi... |
0da4b67b37cc5e9362ac1ca7b9e5c4a6715ca594 | 45fac2a6040d4f3c71004ec8692257d605fbc443 | /02_oop/01_classes_and_objects/06_class_methods.py | ea0bcbd53e1d7f82757a94373df8c350e0655982 | [
"MIT"
] | permissive | doanthanhnhan/learningPY | 4b77078b3388d033378641ade920e02767aaf005 | 93c10c5225a306c791402095e1cf0b454f31d0c2 | refs/heads/master | 2023-04-10T08:07:57.339725 | 2021-04-22T08:35:42 | 2021-04-22T08:35:42 | 354,438,781 | 1 | 0 | MIT | 2021-04-22T08:35:43 | 2021-04-04T02:28:43 | Python | UTF-8 | Python | false | false | 373 | py | 06_class_methods.py | # Class methods are accessed using the class name and can be accessed without creating a class object.
class Player:
teamName = 'Liverpool' # class variables
def __init__(self, name):
self.name = name # creating instance variables
def a(self):
pass
@classmethod
def getTeamName(cls):
cls.a()
... |
e4f1b15bc00b4ddc8b18a58c7e16e3f3e50ddaab | 9471cad2c32e5da4ab5ca92b50d18c93d218518e | /johnzelle_solutions/Ch10/exercise10.py | 9254fd6fb2d6109a15c664337e9056a0ca776a57 | [] | no_license | d4nielyliu/MyPython | 7747f9bc25f88dc3bc565d0ce9b90db87c1e74f7 | 10a2c92e653a7ee29ef4ec4a3322c265f52a5d62 | refs/heads/main | 2023-04-19T13:09:58.706367 | 2021-05-02T22:14:55 | 2021-05-02T22:14:55 | 356,041,055 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 295 | py | exercise10.py | from cube import *
def main():
r = eval(input("What is the side length of your cube? "))
c1 = Cube(r)
A = c1.surfaceArea()
V = c1.volume()
print("The volume of your sphere is {0:0.4f}.".format(V))
print("The surface area of your sphere is {0:0.4f}.".format(A))
main()
|
bd03586d9dde4d14b49a83a51cb88a4a79f3d0e1 | 9f877b9a3a27b2deb17682f74237f038f20b712d | /ib/level_2/arrays/max_set.py | 3065577b64fb3beb72a3abf59c648526164eacd3 | [] | no_license | pppk520/miscellaneous | 331088371565b84692170782b0ebd8876c33cc94 | e5788fa3ce5fbdd6819aa0d7d4a6f924e4da5d5c | refs/heads/master | 2021-01-19T00:36:28.214192 | 2017-12-07T02:42:02 | 2017-12-07T02:42:02 | 100,569,104 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,726 | py | max_set.py | '''
A : [1, 2, 5, -7, 2, 3]
The two sub-arrays are [1, 2, 5] [2, 3].
The answer is [1, 2, 5] as its sum is larger than [2, 3]
'''
class Solution:
# @param A : list of integers
# @return a list of integers
def maxset(self, A):
max_sub = []
max_sum = 0
max_len = 0
start = 0
... |
81af8049166e0d103dc2f8bbb0bc5d29c1c2f69d | d2605ecb247f7b27a2b3c843b0559f67dd64e759 | /Auction.py | e4303e523b1184aa48e6c1772201139013413b40 | [] | no_license | archienorman11/sponsored-search-auction | 45af54d95968bd99c5d0b5c69ddee2b47b70c34b | eaaf2ea0ef4da1be9c645f99da4e80e24ce24906 | refs/heads/master | 2021-01-20T19:18:33.139312 | 2016-07-08T13:54:14 | 2016-07-08T13:54:14 | 62,894,433 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,193 | py | Auction.py | #!/usr/bin/python
import Bid, Slot
import itertools
class Auction:
'This class represents an auction of multiple ad slots to multiple advertisers'
query = ""
bids = []
def __init__(self, term, bids1=[]):
self.query = term
for b in bids1:
j = 0
# print(len(self... |
ac5b66302fd5b81286d3c9dbbf7dcf038ad1822b | c26298795a2be7bc99459085d699462e99872555 | /MyBudgetManager/Database/FileDBMethods.py | 66aefc04df30fc4397212159769509c5df4ea138 | [] | no_license | trojanosall/MyBudgetManager | 1a3031df5d8fb6f8acb63c0ef180e7682372ff8e | ae0c2211520c2dc9fd3d631dd6e40187a47995c5 | refs/heads/main | 2021-06-22T17:00:27.807250 | 2020-12-15T14:17:04 | 2020-12-15T14:17:04 | 153,182,711 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,623 | py | FileDBMethods.py | import sqlalchemy as sqla
import MyBudgetManager.MyBudgetManager.Log.logs as logs
import MyBudgetManager.MyBudgetManager.Models.File as File
from MyBudgetManager.MyBudgetManager.Models.base import session
path = R"C:\Users\troja\Private\Python\MyBudgetManager\MyBudgetManager\FinancialStatementDirectory\convertcsv.xml... |
034d0b991ab8dbc7c97d926705a4f8d63fcb4b26 | 8d30e0e25bbb12bcbb14ca9813180d383f18d884 | /os/total_size.py | a5e123675655b16bdfbac3419c63e874cfafaf8a | [] | no_license | rahmadsubakti/mypycode_collections | ab515f574bacf4a96edeca44df967aa57eac3943 | e8ad866fbc3e3224b2693adf294ed1302d2bfc15 | refs/heads/master | 2021-06-30T03:58:32.989755 | 2019-02-12T01:15:10 | 2019-02-12T01:15:10 | 170,229,142 | 0 | 1 | null | 2020-10-01T10:03:10 | 2019-02-12T01:11:51 | HTML | UTF-8 | Python | false | false | 489 | py | total_size.py | from sys import argv
import os
script, path = argv
total_size = 0
for root, dirs, files in os.walk(path):
for file in files:
file_path = os.path.join(root, file)
total_size += os.stat(file_path).st_size
if total_size > 10**9: # GB
msg = str(total_size/10**9) + ' GB'
elif total_size > 10**6: # MB... |
b65a0220d0c8d4768ad4ae65c932d7476e6f0214 | eec478bd5eab61c3e687f6ecb1b359c7f4c3e866 | /config.py | a41cb54dc47edc50f3cb6c146542afc8b6551d58 | [
"Apache-2.0",
"MIT"
] | permissive | b0bbybaldi/MAX-Facial-Age-Estimator | 2bbd84de3e8bb040bac3b3bc088e82912472dfaf | 20c876256370aa0a721cecb4e2967a033ae9d900 | refs/heads/master | 2020-03-31T23:39:03.590298 | 2018-10-08T18:17:41 | 2018-10-08T18:17:41 | 152,664,145 | 1 | 0 | Apache-2.0 | 2018-10-11T22:39:37 | 2018-10-11T22:39:37 | null | UTF-8 | Python | false | false | 649 | py | config.py | # Flask settings
DEBUG = False
# Flask-restplus settings
RESTPLUS_MASK_SWAGGER = False
# Application settings
# API metadata
API_TITLE = 'Model Asset Exchange Server'
API_DESC = 'An API for serving models'
API_VERSION = '0.1'
# default model
MODELNAME = 'ssrnet_3_3_3_64_1.0_1.0.h5'
DEFAULT_MODEL_PATH = 'assets/{}'.... |
e67c8613aeb450d6a58487ddd4a62b69d881f5df | 6e59dc567297b7dd654d6d948b3d330d83cc856b | /slotmachine.005.py | e4afd1b556e43c9dd133aa1c2f932003cd18bcce | [] | no_license | C4PT41ND34DP00L/SlotMachine | 612f9e820956467706a907dafe2b23614fa515dd | c6eb1fb1da7593c57d28f300d2f3d092f07d3491 | refs/heads/master | 2021-03-13T04:45:34.756725 | 2013-06-08T01:33:41 | 2013-06-08T01:33:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,148 | py | slotmachine.005.py | import pygame, sys, random
from pygame.locals import *
#initialize pygame
pygame.init()
pygame.font.init()
DISPLAY_SIZE = (600,386) #size of the screen (matches slot machine image)
DISPLAY_TEXT = 'Slot Machine' #window title
#initial values
REELS_INIT = (0,0,0) #initial reels
#initial game-text parameters
#either o... |
9f726f8dc8f7e2f671153069cbcbcce77f1b3c69 | 6233e2c7501a4a97c71075faf8db32663e1166d2 | /basic_chat/chat/views.py | 9665bdbf3c5e8fae8edb0ffdbe15bfd3fd19221d | [] | no_license | dshinzie-zz/basic_life | 908b158b62e733dcc7685ec384b094a85a6c60b2 | 4b56d7970c6b397812dd510232f667052526053a | refs/heads/master | 2021-06-12T21:43:40.739376 | 2017-04-10T05:47:54 | 2017-04-10T05:47:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,634 | py | views.py | from django.shortcuts import render, get_object_or_404, redirect
from django.utils import timezone
from django.http import JsonResponse
from .forms import UserForm, ChatForm
from .models import User, Chat
from django.core import serializers
def home(request):
users = User.objects.all()
chats = Chat.objects.all... |
c49f45b51d99b166936b0c74f1b9f31df8e58b2f | 66991d17de4a5968d90a4a523906d47ec0fa0218 | /unicorn/tests/regress/x86_64_eflags.py | ca7c48d1c48a0e72d52dd9a67e093376d2a28dbf | [
"LGPL-2.0-only",
"GPL-2.0-only",
"GPL-1.0-or-later",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | killvxk/unicorn_pe | 890b32de5a21fe4269c494ac33b6932b3f75dd7b | 3ea3bcaa294a1385f6aa1af090be82811f15661c | refs/heads/master | 2022-02-05T17:03:54.951625 | 2022-01-27T07:03:13 | 2022-01-27T07:03:13 | 163,787,817 | 2 | 0 | MIT | 2019-03-01T01:44:16 | 2019-01-02T03:03:45 | C | UTF-8 | Python | false | false | 1,062 | py | x86_64_eflags.py | #!/usr/bin/python
import regress
import unicorn as U
class WrongEFLAGS(regress.RegressTest):
def test_eflags(self):
# xor r14,r14
CODE = 'M1\xf6'
uc = U.Uc(U.UC_ARCH_X86, U.UC_MODE_64)
uc.reg_write(U.x86_const.UC_X86_REG_RIP, 0x6000b0)
uc.reg_write(U.x86_const.UC_X86_REG_EF... |
6a75db16fa3b23eccf97f4b2c9be2498879fde5e | 08166c6f67763ce121c3d0b5ddc341972547a0c0 | /factorial_number.py | 0b402f7f31aa22b2916a407113b569dfcd5e2a66 | [] | no_license | absognety/ML-Algorithms | e082b2fd92cfe90f9f0559297884647b86608d94 | 2f11d5297b81f92b8398d501420aec6648eea5ab | refs/heads/master | 2020-03-26T20:13:24.838718 | 2019-07-21T10:09:23 | 2019-07-21T10:09:23 | 145,311,511 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 96 | py | factorial_number.py | def factorial(n):
if (n==0):
return (1)
else:
return (n*factorial(n-1))
|
89eda884a5a0fe7bc0b6251970e4e843c79ff06e | 240204db4abf02f5e2ffbedfd12f1c634ea7d5de | /oops/slotstest.py | 253d11f7e673a801f15d682d76e445e5e9705f08 | [] | no_license | Anshum4512501/dsa | fd661f7bed1c2f399020e7fd87efb0913187b57a | 0e87a210860be55104d492f530d80a4cdb1c678d | refs/heads/master | 2023-03-16T06:38:50.707477 | 2021-03-08T02:57:59 | 2021-03-08T02:57:59 | 335,717,544 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 523 | py | slotstest.py | # class Point:
# __slots__ = ('x','y','__dict__')
# def __init__(self,x,y):
# self.x = x
# self.y = y
# p = Point(1,2)
# p.z = 100
# print(p.x)
# print(p.y)
# print(p.__dict__)
class Person:
__slots__ = "_name","age",
def __init__(self,name ,age):
self.name = name
se... |
3f73b36cfbe253008845048ea188ca818b04a6ab | 4af442cbb0242ade5198670922ad4e61038eb6dd | /test.py | 09b2a967255f8683f9b12c972b07e77ad07054b3 | [] | no_license | terry2012/bintran | 1dd54781b93c2d57094500989c3113efb4996204 | 0860a4bacc7e2354eff780d551a5d3e0d57b1fbd | refs/heads/master | 2021-01-18T04:54:46.703745 | 2015-02-11T21:39:47 | 2015-02-11T21:39:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,840 | py | test.py | #!/usr/bin/env python
import sys
import os
import re
from bintran import Elf32, Elf32_Rel, Elf32_Sym, Elf32_Shdr, assemble
from uuid import uuid4
from ctypes import *
def flatten(elf):
'''rewrite short "jmp" to near "jmp"'''
sjs = filter(lambda i: i.mnemonic.startswith('j') and \
i.op_str[0] != '*'... |
a75830e5c90734c6966de90253429f6aa591bdda | c5fbd24d22abdec05dc314c3998bd66d81823ef7 | /exercises/python_projects/MyProject/MyProject/urls.py | d0e1b4905fcf3afe4ebc71e0b58785f20ffe351d | [] | no_license | andrewrod33/rocketu | 6dbf749a22549c381a77c69b0cf30373e0589036 | 727f8e01cfcb4c63b4a3c946bf8ed2b6598d55f8 | refs/heads/master | 2021-01-18T13:58:54.109177 | 2013-10-10T21:46:54 | 2013-10-10T21:46:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,401 | py | urls.py | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'MyProject.views.home', name='home'),
# url(r'^MyProject/', include('MyProject.foo.urls')),
... |
af002e5ec1ec32761f70f964e0ac046949d5581e | 759c9ca15f92713909958cf2a724ee4d308faad7 | /examples/search_loyalbooks.py | d6fc9f3a9c88243539ba20bcb6516d893044826c | [
"MIT"
] | permissive | OpenJarbas/audiobooker | dc8348a14804e88db2982288a73c0977f0532aab | 25085121f7039ccdcf852125d28351ce863b3d5d | refs/heads/master | 2022-02-21T04:11:58.578422 | 2022-02-14T21:26:36 | 2022-02-14T21:26:36 | 163,915,813 | 11 | 5 | MIT | 2020-03-29T04:04:23 | 2019-01-03T02:56:33 | Python | UTF-8 | Python | false | false | 446 | py | search_loyalbooks.py | from pprint import pprint
from audiobooker.scrappers.loyalbooks import LoyalBooks
print(LoyalBooks().tags)
print(LoyalBooks.get_tag(40))
for book in LoyalBooks.search_audiobooks(author="Lovecraft"):
pprint(book.as_json)
scraper = LoyalBooks()
#for book in scraper.scrap_popular():
# pprint(book.as_json)
for b... |
7d2015455cc5f29eb7cacdbebf8d920a4aad3091 | 43bb85a6a31a2073013646f841ea44e6393bdbac | /find_neighbors.py | 45c1dda492a9241fd863a8a5f3756cf2a2d8af8a | [] | no_license | masdeval/NetFlix | 2c1ea5ae0fc212ea6ba6102118ed6d18ba9ff665 | ef2bfb3bba66b69800b04a9d2c95fe91326bcb7f | refs/heads/master | 2020-04-28T23:14:28.488664 | 2019-04-13T12:58:17 | 2019-04-13T12:58:17 | 175,316,036 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,648 | py | find_neighbors.py | #
# For each user in the probe dataset, find those users that are similar in rating movies.
#
import numpy as np
import tensorflow as tf
import csv
from scipy import sparse
import os
# Load a Netflix file in the format USER x MOVIE
# Return: the sparse matrix, number of lines and number of columns
def loadCSVasSpars... |
9aee153434c3c2b413a316ca8dcbb4d57f34c23f | ccf8161aa33db69ad11349e1235ac194e0fca37c | /CH1/CH_1_5.py | f0513855390d0f7f9de2ad4e0e16a3a68e3cab5c | [] | no_license | kubakorecek/PYTHON_BOOK | 4ac0bea1f718f383a677df2f612d7a2b609f7fb1 | 3dc4aaaff2c7f4751fbf5243433ebfbc88baea99 | refs/heads/master | 2020-04-03T08:17:38.607611 | 2018-10-29T00:03:41 | 2018-10-29T00:03:41 | 155,127,850 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 27 | py | CH_1_5.py | """
This is program to
""" |
26cc8d9b64ff0d2971ae56e9828444de9d4463cb | 9b553bbfc8b0807d7f860964d6044d6ccf6d1342 | /defs/module327.py | ffb19cfcaeadcfaf2d51614f862e299deae0cb83 | [] | no_license | DedoGamingONE/tp | 5e2e668f7120b154cf6ef6b002c2b4b51ae07ee5 | 5020395dfd34d4dc846e3ea228f6271bfca1c72a | refs/heads/master | 2023-09-03T06:55:25.773029 | 2021-10-24T21:35:00 | 2021-10-24T21:35:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128,870 | py | module327.py | #
# Generate By: dol2asm
# Module: 327
#
# Libraries
LIBRARIES = [
"d/a/npc/d_a_npc_kn",
]
# Translation Units
TRANSLATION_UNITS = [
"executor",
"unknown_translation_unit_ctors",
"global_destructor_chain",
"d_a_npc_kn",
]
# Sections
SECTIONS = [
".text",
".ctors",
".dtors",
".bss",
".rodata",
".data",
]
... |
e91dc4a3f4a929895dd2ca0325ab30b8f32050fb | fc4370c481ea4423c9955c2a497b083ee16564c9 | /portfolio/base/forms.py | 0bf7f4beda7a20d4e2c2575d23aa8a26afcfa0f1 | [] | no_license | TomHellCat/Portfolio-Using-Django | 9d5561e699f6879d532ea8c45266e90149351615 | 94a9549b93df6523782b745eea60b98a6ac89552 | refs/heads/master | 2023-03-10T07:40:49.956026 | 2021-02-27T04:42:03 | 2021-02-27T04:42:03 | 342,771,033 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | forms.py | from django import forms
class MessageForm(forms.Form):
name = forms.CharField(label='Your name', max_length=30)
email = forms.EmailField()
message = forms.CharField(label='Your name', max_length=200) |
532b80a252356ecb23ea886f3d4c8f0174e6fdec | ab1287568346bfbac9c383d67793d19f2a415971 | /easy/1313_decompress_run_length_encoded_list.py | 0b5ed2dcd568f38cd68984c630bddf20ac50319b | [] | no_license | richwandell/lc_python | 6080e9d0967e853695ff5619d94c512e9908fb68 | 772824ef40cb0011713dba489d40c62b3577db14 | refs/heads/master | 2021-11-18T19:43:42.217991 | 2021-10-03T17:47:17 | 2021-10-03T17:47:17 | 238,301,509 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | 1313_decompress_run_length_encoded_list.py | from typing import List
class Solution:
def decompressRLElist(self, nums: List[int]) -> List[int]:
li = []
i = 0
while i < len(nums):
rlen = nums[i]
i += 1
j = 0
while j < rlen:
li.append(nums[i])
j += 1
... |
ec6822ef9cef60b89f282cb8af26308b08c3b1b0 | 2cff2cd61121b6446520aa02b6d565176365da1f | /papersdb/views.py | ff772ad2467e4d64496d817477e4d252737c4a0f | [] | no_license | jamesrobertwebb/coding_with_james | 6843293edfcc33e445aa4774bcbc56578e0ad0df | 2262d546e232dcc4bf30d5555fcbc3575def2952 | refs/heads/main | 2023-08-22T15:08:39.612603 | 2021-10-07T15:32:56 | 2021-10-07T15:32:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,405 | py | views.py | import papersdb # In grey means not used.
from django.shortcuts import redirect, render
from .models import Paper, Author
from .forms import AuthorForm, PaperForm
# Create your views here.
def home_page(request):
return render(request, 'home_page.html') # No objects are needed here.
def paper_list(request):
p... |
cab94b98a2a062062c5fb41e3b221c4bf9591980 | e093efaca58949e8d28978bba41b272529c148ab | /utils.py | b0988ac2373fff670eb58802f160ec2dcd2a6098 | [] | no_license | BurnhamG/PyTorch-ScalableFHVAE | 6552289047e1326b8df9110dda82ad9341209bc7 | 6bbb562b947153e790188ef09909cfb3c8ffb1c9 | refs/heads/master | 2023-02-24T05:31:59.816301 | 2020-09-08T07:03:46 | 2020-09-08T07:03:46 | 293,647,022 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,293 | py | utils.py | import librosa
from collections import defaultdict
import numpy as np
from nptyping import NDArray
from pathlib import Path
import torch
from simple_fhvae import SimpleFHVAE
from fhvae import FHVAE
import shutil
from typing import Any, Optional
import pickle
def check_best(val_lower_bound, best_val_lb) -> bool:
i... |
1e2b23cbefb4b520ab4e33050cb34326d1fca99d | 4bd207d288c95b9f20785bb841224b914f05c280 | /code-master/lib/bitbots/modules/basic/motion/__init__.py | d4c22e269000838eb471db240d809853aecdf9d9 | [] | no_license | hendrikvgl/RoboCup-Spielererkennung | 435e17ee540c4b4c839e26d54db2528a60e6a110 | c41269a960f4b5ea0814a49f5a20ae17eb0a9d71 | refs/heads/master | 2021-01-10T10:39:00.586760 | 2015-10-21T12:42:27 | 2015-10-21T12:42:27 | 44,675,342 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | __init__.py | def get_motion_modules():
return ["bitbots.modules.basic.motion.animation_module",
"bitbots.modules.basic.motion.button_controller_module",
"bitbots.modules.basic.motion.button_module",
"bitbots.modules.basic.motion.manual_penalizer_module",
"bitbots.modules.basic.mot... |
ff8be0caf390bdbe2a0b64e216fead8835c1a7f4 | 366468f36137d723b30bcf8ce74a620e2a03dc17 | /tredis/bics.py | 9586d279bc22c89d82263a343d5b38f45600cdcb | [
"MIT"
] | permissive | gchiesa/tredis | df03cb374cb2a60891780056ac5a7f6daf1ba72c | 1da14435f34d99aa180eba7cc4d1a3b0422b4a80 | refs/heads/master | 2020-03-20T20:20:05.950122 | 2018-07-10T19:19:14 | 2018-07-10T19:19:14 | 137,682,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,120 | py | bics.py | #!/usr/bin/env python
import logging
__author__ = "Giuseppe Chiesa"
__copyright__ = "Copyright 2017, Giuseppe Chiesa"
__credits__ = ["Giuseppe Chiesa"]
__license__ = "BSD"
__maintainer__ = "Giuseppe Chiesa"
__email__ = "mail@giuseppechiesa.it"
__status__ = "PerpetualBeta"
DUTCH_BICS = [
'ABNA',
'ADYB',
'A... |
981222109a66c3440b0fdb282cea7c3064e3cd29 | 51cc7f07df27ebbdadce08a2b6d3e2a6b79ba6a3 | /house_model.py | 6c3b1fa63ab5a2ca3eba202d37d1a5e3372d0afd | [] | no_license | hasib-cse/HousePricePrediction | 0d51ea48a9c8faedaafc99d1decc9aa497fafeb6 | e05412c8c78d87f5c4ed369b52db7132bccf4147 | refs/heads/master | 2021-01-16T10:56:21.428866 | 2020-02-25T20:11:16 | 2020-02-25T20:11:16 | 243,092,359 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 995 | py | house_model.py | # -*- coding: utf-8 -*-
"""House_Model.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1c5ic0TDBGl3IL-Dz1BQcuF8MJoImwWlt
"""
#Read the dataset
import pandas as pd
data = pd.read_csv("https://docs.google.com/spreadsheets/d/e/2PACX-1vTe0nGcSaHE12JT... |
2de751b8b581bdb83b5a4f38474b696c6229b70c | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/solutions/v20210701/get_application.py | d2b019545f38b87c4baa1e2e7883c80238e67b5f | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure-native | b390c88beef8381f9a71ab2bed5571e0dd848e65 | 4c499abe17ec6696ce28477dde1157372896364e | refs/heads/master | 2023-08-30T08:19:41.564780 | 2023-08-28T19:29:04 | 2023-08-28T19:29:04 | 172,386,632 | 107 | 29 | Apache-2.0 | 2023-09-14T13:17:00 | 2019-02-24T20:30:21 | Python | UTF-8 | Python | false | false | 16,146 | py | get_application.py | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . im... |
78a5922857c8db40d2db5b75485072297ffb556f | 8014241aa6b53fe8ad4e26d45498fc162aab9ea9 | /ICode/estimators/welch/__init__.py | 7e77882cfb4c6eaf211a9071d6d5d241ed986e9e | [] | no_license | qiz2/ICode | fba405b65de97530d3118ff76d1b261bbca39291 | 9c29ff34354fcfce5399af461d4259d423b95e13 | refs/heads/master | 2020-05-26T01:54:24.893025 | 2015-10-01T10:24:17 | 2015-10-01T10:24:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25 | py | __init__.py | from hexp_welchp import * |
b66eea49de00302681377f7a7fa6fe4a54e71a85 | f03bd5bd7873c5cc33b4ef5199f219539f3a340e | /CAAPR/CAAPR_AstroMagic/PTS/pts/core/launch/analyser.py | 63d0c4d7d64a3d92ddd9be6abd0cfa725d299ae5 | [
"GPL-1.0-or-later",
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-philippe-de-muyter",
"MIT"
] | permissive | Stargrazer82301/CAAPR | 5f8a7033b16792f23abd5d07021b53b9228a5db4 | 62b2339beb2eb956565e1605d44d92f934361ad7 | refs/heads/master | 2022-08-29T02:53:33.658022 | 2022-08-05T19:06:46 | 2022-08-05T19:06:46 | 49,977,601 | 8 | 1 | MIT | 2022-08-05T19:06:47 | 2016-01-19T19:32:42 | Python | UTF-8 | Python | false | false | 7,177 | py | analyser.py | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... |
9c8f3fb39232caeb1b86ed096c682be0e2a81601 | fca561d242736ecae258a58e5f66e455cb87b149 | /app.py | 8f5802ac3589886b5c2a74bd2527d485fa9447ab | [] | no_license | nilson01/databaseSystemForElectronicGadgets | f1d33f94940197951cae5559a501a482638f1fda | c8d2479eac04c4b4c7231852573923e70d676b0f | refs/heads/main | 2023-08-10T17:21:52.038257 | 2021-09-17T04:38:04 | 2021-09-17T04:38:04 | 363,732,118 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,445 | py | app.py |
import sqlite3
from flask import Flask, render_template, request
app = Flask(__name__)
InsertProduct = "INSERT INTO Products(maker, model, type) VALUES( ?, ?,'PC');"
InsertPCs = "INSERT INTO PCs(model, speed, ram, hd, price) VALUES(?, ?, ?, ?, ?);"
query_Pc = "SELECT P.maker, P.model, P.type, Pc.speed, Pc.ra... |
df43314136bb39a8c3c24afb076612ab219f409f | 559e1899c3c48ae4d1d043d26844267adc80c387 | /plugins/modules/fujitsu_ipcom_config.py | f78a7d4d7760176aff94ae32ae36466d885c8fcf | [
"MIT"
] | permissive | takamitsu-iida/ansible-fujitsu-devices | d5f97f4c40dc999e917415468926d663a56a6d9c | 077c5c0e6e7b186e7ec23cb973557d393b435dbc | refs/heads/master | 2020-12-05T11:51:43.503085 | 2020-01-07T03:31:41 | 2020-01-07T03:31:41 | 232,099,961 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,515 | py | fujitsu_ipcom_config.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring
"""fujitsu_ipcom_config module.
Send configuration commands to the remote node.
Takamitsu IIDA (@takamitsu-iida)
"""
ANSIBLE_METADATA = {'metadata_version': '0.1', 'status': ['preview'], 'supported_by': 'community'}
DOCUMENTATION = """
--... |
6b2dc4cb7e63d94611959f380f3a1f519b86c718 | 145e7ee5cb266ecca521667703564f2954914aab | /models/product_giftcard.py | 76017f7732d6e1904bc3811452fd3a23edbb01e7 | [] | no_license | EranGrin/inceptus-pos_giftcards | 4f768b413220021a7a632049377a5376c8572d39 | dd52941e60bc8a6a839e7cbe3d61cf13acd875aa | refs/heads/master | 2023-04-28T04:56:05.054495 | 2019-10-28T09:14:29 | 2019-10-28T09:14:29 | 217,389,982 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,116 | py | product_giftcard.py | # -*- coding: utf-8 -*-
# Part of Inceptus ERP Solutions Pvt.ltd.
# See LICENSE file for copyright and licensing details.
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError
class ProductTemplate(models.Model):
_name = 'product.template'
_inherit = ["product.template", "ies.b... |
daf504447a4e410b1ab99b2e6016ca4aca14b83a | 8d1f7a2357f13f08ccb859dd55200830e5167922 | /ScienceDynamics/config/__init__.py | 8338c2d757c0b063ac9328bfd27f8b831b07fa82 | [
"MIT"
] | permissive | data4goodlab/ScienceDynamics | 2226d72b1f35912c3655175c39ddaff7e0737b39 | 1ba24a7a0ec64058b6095541b0ecc5d5d294b588 | refs/heads/master | 2022-12-02T06:08:07.785289 | 2020-08-17T08:45:47 | 2020-08-17T08:45:47 | 277,306,258 | 1 | 1 | null | 2020-07-07T06:30:59 | 2020-07-05T13:21:20 | Python | UTF-8 | Python | false | false | 44 | py | __init__.py | from ScienceDynamics.config.configs import * |
a6b6aa999867280a04f08222d9aea55dc7fed24d | aac87a5fe5ef495f37168bf4b7f69149564055d2 | /CreateDocLib.py | b980678155443592f425edcae23e0cabb9c86e6d | [] | no_license | monkey77777/PythonStudy | 97e29704cafc198b1c850bd9dd4cdf39224db150 | 4edef46cd6d6f4a0bc2565dcc0e3dad1016ce819 | refs/heads/master | 2022-12-30T04:27:03.797956 | 2020-10-10T12:23:30 | 2020-10-10T12:23:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 773 | py | CreateDocLib.py | import sqlite3
import csv
import os
import datetime
# データベースに接続する
conn = sqlite3.connect(r'C:\pg\example.db')
c = conn.cursor()
# 読み込み
lstImp = []
# メモリテーブルの定義
# データの読み込み(インポートテーブル) 単語辞書の作成
for row in cur.execute('''
select texPaperAbstract
from impDocLib
where texLibFlg = 0
and texDelFlg = 0
'... |
5771f49ad5254588f1683a8d45aa81ce472bb562 | dff7d7d02002e98f8e6899ea18d37da4a33663bc | /python/problem47.py | 2f7deef474c57162cfb097d485b43c3fcd645b55 | [] | no_license | jobby/project-euler | f81e999d09a9bb441079d4df81164ba6b0fa76d6 | 507d61daf0827d46270e00bc8ce3e3ea380eb162 | refs/heads/master | 2020-12-24T16:49:18.116785 | 2012-12-01T00:47:43 | 2012-12-01T00:47:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 948 | py | problem47.py |
def prime_sieve(n):
if n==2: return [2]
elif n<2: return []
s=range(3,n+1,2)
mroot = n ** 0.5
half=(n+1)/2-1
i=0
m=3
while m <= mroot:
if s[i]:
j=(m*m-3)/2
s[j]=0
while j<half:
s[j]=0
j+=m
i=i+1
m=2*i+3
return [2]+[x for x in s if x]
ps = prime_sieve(1000000)
def get_primes_upto(n):
... |
44d87f112ab60a202e4c8d64d7aec6f4f0d10578 | 3b07655b0da227eec2db98ab9347c9e7bdbc3ffd | /scielomanager/journalmanager/tests/modelfactories.py | c981bd63a9271034b6c39a007bcdfa298a30a129 | [
"BSD-2-Clause"
] | permissive | scieloorg/scielo-manager | a1b7cc199e5f7c4d4b34fd81d46e180028299d7d | 0945f377376de8ef0ada83c35b4e2312062cdf45 | refs/heads/beta | 2023-07-12T08:23:59.494597 | 2017-09-28T18:39:39 | 2017-09-28T18:39:39 | 1,778,118 | 9 | 5 | BSD-2-Clause | 2023-09-05T19:42:58 | 2011-05-20T19:41:53 | Python | UTF-8 | Python | false | false | 7,603 | py | modelfactories.py | # coding: utf-8
import os
import factory
import datetime
from journalmanager import models
from django.contrib.auth.models import Group
from django.core.files.base import File
_HERE = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(_HERE, 'xml_samples', '0034-8910-rsp-48-2-0216.xml')) as xml_fil... |
81dfdf0479fc1f136fa5153840d8c7015f9db676 | 8d0783a9f757b395502bd127c4544e98f4faab84 | /bot.py | 424d74ba4acff9ee68bce80c743450e6a5417046 | [] | no_license | AchmadBudy/BotPy-manual | 07bea6daa225e289386e222d213f3d81b02571e8 | 37c4348c05547a77b2b4b382379050e0ef9dc851 | refs/heads/master | 2022-04-18T10:19:09.542588 | 2020-04-15T10:25:34 | 2020-04-15T10:25:34 | 255,838,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 355 | py | bot.py | # required !!!
# pip install selenium
# pip install webdriver-manager
from theMachine import loops
# fill the number and message
# you can fill the number with array
phoneNumber = "fill the number"
message = "fill with ur message"
loop = 1 # this how many u want to loop
loops(loop, phoneNumber, message)... |
24de4f486d4e976850e94a003f8d9cbe3e518402 | 90e73318ef4cb9a02423141c626def64d4ed15fb | /insertion sort.py | 786ed482bab1b3cdeb091f8eecfe3f08f1ef4ed5 | [] | no_license | alanchristo/sorting | b55496daef94c923d9355f16434769c9908922d4 | c985558d3863a72e6c969d62b89ce814a7aff343 | refs/heads/master | 2020-04-23T03:20:17.871743 | 2019-02-15T14:15:51 | 2019-02-15T14:15:51 | 170,875,110 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 316 | py | insertion sort.py | a= input("Enter number")
a= a.split()
b=[]
for x in a:
b.append(int(x))
print(b)
l=len(b)
c=0
s=0
for i in range(l):
s=len(b[:i])
for j in range(s):
if b[s]<b[j]:
c=b[s]
b.pop(s)
b.insert(b.index(b[j]),c)
print(b,b[:i],b[s])
|
0ecd2a298203365b20b2369a99c3c1d7c0646f19 | a6c410f6681df1512c564a29c2c9de8c0a85f743 | /Students/JakeAnderson/session02/ack.py | ea1556dacdce21f929ac497200a970e6da80a549 | [] | no_license | bm5w/sea-f2-python-sept14 | 40f97d74638ff147b254bd8a6c76ebd97c8a6ac7 | c64c6d8b822b0f08913328ebb6d2dd98fd971ac3 | refs/heads/master | 2021-01-22T07:28:05.892007 | 2015-01-10T07:17:14 | 2015-01-10T07:17:14 | 28,167,719 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 643 | py | ack.py | # coding: utf-8
#ack program with the ackermann_function
""" ackermann_function """
def ack(m,n):
#n+1 if m = 0
if m is 0:
return n + 1
#A(m−1, 1) if m > 0 and n = 0
if m > 0 and n is 0:
return ack(m-1, 1)
#A(m−1, A(m, n−1)) if m > 0 and n > 0
if m > 0 and n > 0:
re... |
a98be930058269a6adbc9a28d1c0ad5d9abba136 | 9504ec77082fa44aac4f7173f362de49b6f4f382 | /breathe.py | b5789fec60d48aab62f12ebf09e4cb9623b19914 | [] | no_license | rudotcom/WHM | 94f0b6b02ee6721754e18b84d2caff6b0e0b9371 | 27552dfb2addc149a80666ee7017bff45a4c1951 | refs/heads/master | 2023-03-02T09:37:51.976230 | 2020-12-19T20:02:27 | 2020-12-19T20:02:27 | 322,706,400 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,540 | py | breathe.py | import sys
import time
import pymorphy2
import pyglet
import pyttsx3
import threading
import warnings
import pytils
warnings.filterwarnings("ignore")
""" Количество раундов, вдохов в раунде, задержка дыхания на вдохе"""
rounds, breaths, hold = 4, 30, 13
def play_wav(src):
wav = pyglet.media.load(sys.path[0] + '... |
4f0933c58aa1d41faf4f949d9684c04f9e01b473 | 0da4dc85de9f487e81b0b5a62b2db3209d86b1e1 | /ex17.py | a89d67b2085dde0afbde085cc8921ea35689694a | [] | no_license | raulpeter/lpthw | 12640d5e575c8d0286a64341561f0fbe60c5b85d | ae5c370c5db09f97fbf2bd6834deddd616c6bda9 | refs/heads/master | 2020-12-28T00:28:59.629043 | 2020-02-07T02:00:15 | 2020-02-07T02:00:15 | 237,896,339 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 434 | py | ex17.py | from os.path import exists
from_file = input('form_file')
to_file = input('to_file')
print(f"copying from {from_file} to {to_file}")
indata = open(from_file).read()#这种方式读取文件后无需close
print(f"the input file is {len(indata)} bytes long")
print(f"does the output file exist? {exists(to_file)}")
print("return to continue,... |
5c81ddbc8f5a162949a100dbef1c69551d9e267a | af9fa254e599824fe8c906480056d6282d1f674e | /todolist/todo/tests/test_models.py | bb31902f306807b954d30ac202a2249c65d7f13b | [] | no_license | theghost7771/todolist | ae5faf8ababd40c15d70e6a3a49d0519b72644f2 | 7e07874a9dabc4c6167d74968f6bcc6b88b6a03f | refs/heads/master | 2021-01-19T23:47:29.733786 | 2017-04-28T11:57:21 | 2017-04-28T11:57:21 | 89,019,687 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 912 | py | test_models.py | # -*- coding: utf-8 -*-
from django.test import TestCase
from django.contrib.auth.models import User
from ..models import Todo
class MyTestCase(TestCase):
def test_mark_done(self):
user = User.objects.create_user(email='user@…', username='user', password='somepasswd')
todo = Todo(title='SomeTitl... |
509129052f97bb32b4ba0e71ecd7b1061d5f8da2 | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/225/users/4271/codes/1573_1329.py | 207a0eaf64b6f1bdfd8ff427d6fca0d780e1b9f7 | [] | no_license | JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15 | py | 1573_1329.py | print (180 / 4) |
2c90c4e0b42a75d6d387b9b2d0118d8e991b5a08 | 46c93ba17b49e5963a4a45722bc2518d2d4e2711 | /app/model/base.py | 343cae3599e9157edb356207d326889a7946b472 | [] | no_license | bithaolee/flask-framework | efa75ac9cbd2f87294a506c9a391d50e136703aa | 25c8be1adb9078bfa328faedfbf8c921b5706471 | refs/heads/master | 2023-03-05T22:52:12.524332 | 2021-02-02T06:35:46 | 2021-02-02T06:35:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,094 | py | base.py | import math
import decimal
from typing import Union, List, Set
from sqlalchemy import text
from .model import BaseMixin
from ..core.db import db
Orders = List[Set(str, Union(str, int, decimal.Decimal))]
class BaseDBMgr:
def get_page(self, cls_:BaseMixin, filters:set, orders:Orders=list(), field:tuple=(), pag... |
1825273e1ec9b65ee2e2c56f3424c26b2c124047 | 39a4a7b198c426a879a0913820137a586d44404b | /tictaktoe.py | 6e225ab359837e690d87d15917375f43a59b2c69 | [] | no_license | Narengowda/algos | 71693107697812c02486410db9d2cc5858e95b71 | 39bfe0af80d7571957a766a1199886300b19c7f0 | refs/heads/master | 2021-01-20T08:31:35.309933 | 2020-01-17T15:33:53 | 2020-01-17T15:33:53 | 68,090,146 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,733 | py | tictaktoe.py | import copy
import curses
import time
x = 'x'
o = 'o'
n = None
LOG = False
class Board(object):
X = 'x'
O = 'o'
def __init__(self, player='x'):
self.board = [
[None] * 3,
[None] * 3,
[None] * 3,
]
self.x_won = False
self.o_won = Fals... |
6c11f88e1be27cccfce720888c0e20f6cb6dbd0b | d9c2e24e1050604a5a2a2e1fed9876aa7795019b | /flaskr/msc.py | 741298017b00b11d81893b98baf1ce6b5f9f13f1 | [] | no_license | CiaraMadden/Python | 2d62a66b34d4bd968f77665b96f10d0272d0a9b0 | f70117e0150fff992cbd0d6ba3ffc18b98ccf88c | refs/heads/master | 2021-07-08T01:34:51.857171 | 2017-10-06T15:43:21 | 2017-10-06T15:43:21 | 105,866,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | msc.py | from __future__ import print_function
import requests
def insertInfo(name,location):
requests.post('http://127.0.0.1:5000/sms/update/'+name+'/'+location)
def getInfo(name,location):
requests.get('http://127.0.0.1:5000/sms/'+name)
if __name__ == '__main__':
insertInfo('Ciara', 'Dublin')
getInfo('Ciara','Dublin... |
8f274c9d9ff54598f18197625eb35547b8cde0cb | 4726740c8135f9985afc074ece0e1f2f5a103a30 | /LMS/teacher/admin.py | 27f4af22ee6e7c445397e9d1d0adfcb1d4268215 | [] | no_license | ishyummy/Bangladesh | 2aececa605a559d34cb27797895be15cc3015433 | 23c18865c7c5d7fff9fe4f5111ec52cc554229ff | refs/heads/main | 2023-08-04T22:48:11.218603 | 2021-09-30T14:57:55 | 2021-09-30T14:57:55 | 411,712,903 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 161 | py | admin.py | from django.contrib import admin
from .models import Teacher, Class, Enroll
admin.site.register(Teacher)
admin.site.register(Class)
admin.site.register(Enroll)
|
8bf8548cc562fe6d4204a220ff558ea54724e6eb | 5bef51c5ca5166cb8827c4aa5c6d68350939ab34 | /git_first.py | beb7dbebef6824bfcde587792ea980cb598a0583 | [] | no_license | mcerdio/python-cfg | 54ee87a24278d74dc29578bbadaababd72749803 | 9f6ad9bc4a19086c91dd59d01751f9d9df8638f9 | refs/heads/master | 2020-04-06T07:27:01.332689 | 2018-11-12T20:38:42 | 2018-11-12T20:38:42 | 157,270,281 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14 | py | git_first.py | print "maria"
|
4c62ab9ac7971db034f766ed1122f3064d533026 | d168544201c39edd1cfab324e3338e8926cff6a5 | /apps/task/models.py | fbba81fbb4a187dc3c756cf5b1aa8292c6b522bf | [] | no_license | elStuk/task_manager | 24b11a5b5f0109fdc6377b4c7584c307fa8e6066 | 55a13f2f8315ce80c7bcd528af0ccdf47020a6cd | refs/heads/master | 2020-05-23T22:32:10.347772 | 2019-05-16T07:24:07 | 2019-05-16T07:24:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 846 | py | models.py | from django.contrib.auth.models import User
from django.db import models
class Task(models.Model):
user_created = models.ForeignKey(User, on_delete=models.CASCADE, related_name="user_creat")
user_assigned = models.ForeignKey(User, on_delete=models.CASCADE, related_name="user_assign")
title = models.CharFi... |
2b751cfbe53033314a75a6c806530f5c822cd3de | 223cac730da0305b6ebb9c679add169afa2cd6a1 | /commands/_chains_pcs.py | 849b1a1487ae38d0c259157eb04f11d567f0fac9 | [] | no_license | jmartign/clufter | 6926737f5049d7731eb16bb94ac900f26038c98f | 7596cc6596787c6632a9c130bfa6307b943f40a0 | refs/heads/master | 2021-01-12T12:22:53.883127 | 2016-10-20T19:24:32 | 2016-10-20T20:07:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,799 | py | _chains_pcs.py | # -*- coding: UTF-8 -*-
# Copyright 2016 Red Hat, Inc.
# Part of clufter project
# Licensed under GPLv2+ (a copy included | http://gnu.org/licenses/gpl-2.0.txt)
"""Chains of filters used in *2pcs* commands"""
__author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>"
from ..utils import args2tuple, args2unwrapped, t... |
a9695fad35c4b4782b86453e09e764f6093e1864 | 52fb455d80013780520f5fd156a71ddc77c614f2 | /Chapter04/tic-tac-toe_AI.py | f60390e40008db13e9980e25fff1e6bf875ee4fc | [
"MIT"
] | permissive | PacktPublishing/Learning-Python-by-building-games | f3421bd3929e49efda561ee1d212d5804244d489 | e6045d0456ede27f71e449d3c73f3f001f278ae2 | refs/heads/master | 2022-11-05T14:07:27.274353 | 2022-10-31T06:47:02 | 2022-10-31T06:47:02 | 178,140,193 | 27 | 27 | MIT | 2020-03-18T21:37:21 | 2019-03-28T06:27:31 | Python | UTF-8 | Python | false | false | 4,146 | py | tic-tac-toe_AI.py | import random
def printBoard(board):
print(' | |')
print(' ' + board[7] + ' | ' + board[8] + ' | ' + board[9])
print(' | |')
print('----------')
print(' | |')
print(' ' + board[4] + ' | ' + board[5] + ' | ' + board[6])
print(' | |')
print('----------')
print(' | ... |
4d505ef1916703463b92e24a3e1a30f7e4c3869b | e7bd32d0a1187cf3f1dffbc58973255d48ec21e4 | /detector/language.py | c58897e950b99a035464ed5aae85117918b34d4e | [] | no_license | vandofb/examples-in-python | cd1a782c5944cc6a73323d75ee2b767172b69389 | 70f19833503ada61bf7c492ac7c8a2b6b0a3e62b | refs/heads/master | 2020-05-30T08:39:41.277454 | 2016-06-04T18:21:40 | 2016-06-04T18:21:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | language.py | # coding=UTF-8
from tokenizer import Tokenizer
class Language:
def __init__(self, language_io, name):
self.name = name
self.vectors, self.characters = Tokenizer.tokenize(language_io)
|
efb5e2bd63470f9e188134316b32c1aa9904b21a | 0e1f2175e9ae115077c78dd7d89463a22b4f939c | /oop/compare_functions.py | cabb218281d895bfd42b46d1d2e2f7a7de4fd1ac | [] | no_license | MaksymSkorupskyi/checkio | 6815f6bf289efd69d977b869b78b7ace78aa54b2 | 4ed58efc6482b71f6d0ef238eceab8cf519895ca | refs/heads/master | 2020-09-30T01:27:00.144027 | 2020-01-02T10:41:03 | 2020-01-02T10:41:03 | 227,166,445 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,685 | py | compare_functions.py | """Compare Functions
Two functions f and g are provided as inputs to checkio.
The first function f is the primary function and the second function g is the backup.
Use your coding skills to return a third function h which returns:
- the same output as f unless f raises an exception or returns None.
- In this case h sh... |
3b2f25c02de52ef4856392ed94289fce8259f2d9 | 0386ac7df4a57082237bd424e60904f543dec966 | /application/server.py | 6b3f52cc315732de76a987eebb776bb83b9b7a8c | [] | no_license | uk-gov-mirror/LandRegistry.cases-alpha | 8fbd9fd33b52f0717b99d49ec885edd4274d4e3c | 2bd54898c01d2b967bce634faa642ccd558c90a5 | refs/heads/master | 2021-05-28T06:53:44.532565 | 2014-12-19T17:38:15 | 2014-12-19T17:38:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,445 | py | server.py | import json
import logging
from flask import request, jsonify, Response
from sqlalchemy.exc import IntegrityError
from application import app, service
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
@app.route("/")
def index():
return 'OK'
... |