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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
68d537cb8488ae4f2c8300e885be78540952dec0 | 404728244681a773f55be7f7b0c4933f439f3106 | /walis/service/activity/pay_notice/query.py | 300645ecf5abf713de3c6a22220d5b247794f65a | [] | no_license | limingjin10/walis | c4e22db27d964cefa068883edf979cabfedd74d6 | 198a4e94992c1790b7a9f2cd34b1686fefc87845 | refs/heads/master | 2021-05-29T04:50:34.091849 | 2015-06-15T14:19:23 | 2015-06-15T14:19:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,506 | py | query.py | #!/usr/bin/env python2
# coding=utf8
from __future__ import absolute_import, division, print_function
from sqlalchemy import func
from walis.model.walis import walis_session
from walis.model.zeus import zeus_session, zeus_db_handler
from walis.model.zeus.activity import (
SubsidyProcessRecord,
SubsidyPayReco... |
a32fb683f8d46f901e8dcd2d075ace22ee81e076 | 3e52e19ae1261e600898c83c55ec5e7477479a0e | /set1/problem3.py | e31872fcb4ae596587520a6355344c402151b530 | [] | no_license | sashafrolov/CryptoPalsChallenges | 3ec70ea626119bff5bda80ecc9dd7a0afbf2820f | e6ad76fdd7cddd35250ee282e515ca677a70ccd6 | refs/heads/master | 2020-03-26T20:29:05.115738 | 2018-09-04T19:15:36 | 2018-09-04T19:15:36 | 145,326,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 819 | py | problem3.py | import base64
import string
def hexStringtoBytes(hexstring):
byteArray = bytes.fromhex(hexstring)
return byteArray
def xorBytes(bytes1, bytes2):
xored = bytes([x^bytes2[i] for i,x in enumerate(bytes1)])
return xored
def xorAgainstCharacter(byteArray, character):
str2 = [ord(character)] ... |
b9c058bdb04df93beb379d05939b00f4db423cd3 | 2255ba9e7516d36320728f4e1d4396904c0d53ef | /DatabaseFiller/python.py | 0357ba0b239b677f6d784cb0abde711704c7b91d | [] | no_license | Rifhice/ScriptIG | 799e9f118666c3a72e3f733e5064c2739dcbe07a | e0c179cd684567565532b950aeb8a5e12614e3a5 | refs/heads/master | 2021-01-20T01:12:06.718702 | 2018-04-09T12:41:34 | 2018-04-09T12:41:34 | 89,237,176 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 819 | py | python.py | import string
import random
import os
from threading import Thread
class Process(Thread):
def __init__(self):
Thread.__init__(self)
def run(self):
while True:
prenom = id_generator(random.randint(4, 8))
nom = id_generator(random.randint(4, 8))
password = id_... |
9b581df505765e895047584c5bb586faef95295f | 58c2d44c2bae3da85aa27ec1db9b9b3386d1ad0b | /dash_helpers.py | 731dffee3d23998e319144a57c12b61732257f69 | [] | no_license | oohshan/SmartGameGoalsGenerator | a4b1e5a360ae1dcc12a9186691e98834b73daa3f | 197336e375f29e891cd4598b50c691506eb61d9a | refs/heads/main | 2023-02-15T08:11:24.930833 | 2021-01-11T17:38:52 | 2021-01-11T17:38:52 | 328,743,413 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,856 | py | dash_helpers.py | import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_table as dt
import plotly.express as px
import pandas as pd
import plotly.graph_objects as go
import numpy as np
from datetime import datetime as dat
from sklearn.model_selection import train_test_split
from sklearn... |
fdcee5b3f6b3ec170c9ef3017e0cc6c4b28cf22d | 1e77188b7bf9a2a440917e2bb0966abecf1f30ce | /advert/admin.py | 3046168c4e220b46a031ebee4156bf546710aa13 | [] | no_license | Giraffe-in-hood/common_home | 83f0dc8c901337ec9eabe8b7dec8eaf317bf692b | 6db8780a0d55381b428e37363d2e32800371e724 | refs/heads/master | 2020-04-08T11:35:35.071186 | 2018-12-07T16:06:28 | 2018-12-07T16:06:28 | 159,311,614 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 331 | py | admin.py | from django.contrib import admin
from .models import Advert, Category, ImageAd
@admin.register(Advert)
class AdminAdvert(admin.ModelAdmin):
filter_horizontal = "categories",
@admin.register(Category)
class AdminCategory(admin.ModelAdmin):
pass
@admin.register(ImageAd)
class AdminImageAd(admin.ModelAdmin)... |
ae5f87f1c383478ea5f370af1c85d63a472a7788 | 4b7b425cf617458e798f5d0610a11d6b986d98d2 | /array.py | 5e7a6b6af87cb5adada613cffcf3ff5831de98c2 | [
"MIT"
] | permissive | nkukadiya89/learn-python | 7b309fabd7b272854ef387d1a0e6eddc9d8b1288 | d0a8c438dd77b8feeb1e0126ec379873ef4b2978 | refs/heads/master | 2020-12-19T00:58:53.947159 | 2020-03-19T11:29:56 | 2020-03-19T11:29:56 | 235,571,906 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 108 | py | array.py | #Array In Python
from array import array
numbers = array("i",[1,2,3])
numbers[0] = 0
print(list(numbers))
|
9c05b39a12ab29db99397e62315efddd8cdf1df4 | 7edafb8e10c31bffd12420a4cee61d0a841fd226 | /测试代码/字典.py | c255ff701349f1e1bd3503b9bc713822e8ec723c | [] | no_license | xiao2912008572/Appium | ca11d2cf82f9dcc051e9b719eb09f862f07621bf | 3931957a8ae9b4ee2acc13ae4aba0ba46b6d842b | refs/heads/master | 2021-01-21T12:27:36.243484 | 2018-09-12T09:25:35 | 2018-09-12T09:25:35 | 102,071,447 | 8 | 2 | null | null | null | null | UTF-8 | Python | false | false | 335 | py | 字典.py | dict1 = [
{'a':1},
{'a':2},
{'a':3}
]
a = dict1[1]['a']
# print(a)
correlation_dict = {'${class_id}':123}
data = {'token': '${self.token}', 'name': 'api测试','class_id': '${class_id}'}
for k in data:
for key in correlation_dict:
if data[k] in key:
data[k] = correlation_dict[key]
pr... |
2467825d2cb01c86d3ba27562decc12551877af1 | cd76ed8016fd23b1c216b8f7d2d561ecb21a8b73 | /coverage.py | f511089c2902a249048991333171a3dda8f4bc5c | [] | no_license | fak/pfam_map_loader | d1e909e3fad683442636206abc0569bff6ad6967 | 7451708646f4dffd80675a3388c7e4c53576dad7 | refs/heads/master | 2020-12-31T03:42:29.607738 | 2016-05-07T14:32:05 | 2016-05-07T14:32:05 | 23,348,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,853 | py | coverage.py | """
Script: coverage.py
Identifies domains that only occur in multi-domain proteins. The main
script is master.
--------------------
Felix A Kruger
momo.sander@ebi.ac.uk
"""
####
#### import modules.
####
import queryDevice
import operator
import yaml
import time
####
#### Load parameters.
####... |
51af54c55834c4bdb8e1cbe4ac55b86bdc61bf4d | 99dbaafa45494d3dd7f8602b8d263f909d39dfb8 | /notesapp/migrations/0009_auto_20150819_1225.py | 41d11653a23af4ad195a660950602501a6e2d7fb | [] | no_license | scofield1991/notes | ae8355eab527c2957286718280420e1f4fdba3c9 | 8595a7ccf0cf4add081217f50caf5bc26660fd19 | refs/heads/master | 2020-04-06T06:38:59.199091 | 2015-08-25T11:50:06 | 2015-08-25T11:50:06 | 40,888,263 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | 0009_auto_20150819_1225.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.utils.timezone import utc
import datetime
class Migration(migrations.Migration):
dependencies = [
('notesapp', '0008_auto_20150819_1222'),
]
operations = [
migrations.Ren... |
a8b1b218e6649545000803c91c803580cfdbd4f1 | eea1d136974480d4fffe319c7dcd9ff93d39deda | /setup.py | df6f4496121f04fd804ea264ec61a86be6065009 | [] | no_license | vijulondhe/Weather_Data_Storage_Retrieval | 6923aa46a475bc89a8e4d25e825319af12431e81 | f408902ddf5c27524fba4129f4a6eb80fa79def3 | refs/heads/main | 2023-05-14T23:13:11.238399 | 2021-05-27T07:09:28 | 2021-05-27T07:09:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,559 | py | setup.py | import random
# Imports MongoClient for base level access to the local MongoDB
from pymongo import MongoClient
# Imports datetime class to create timestamp for weather data storage
from datetime import datetime
# Importing DailyReportModel class to use the implemented method to insert data into daily_report_model ... |
bb58f7f40ca99ea0dcdc3d35f9eb921847ffc66e | d0917e5ba6292f28a6c21ba801a15207d6c99545 | /calculadora/tests/features/steps.py | 22dc10d037cab4b4306454d14f1e12e59989b740 | [
"Apache-2.0"
] | permissive | stylder/calculadora | 1c7a6e0e3c878e425c767037f09050259662a383 | ac58f28e809f8a4b7fdb24e389af059afbf98eaf | refs/heads/master | 2021-01-11T00:36:07.600399 | 2016-10-10T17:39:57 | 2016-10-10T17:39:57 | 70,509,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 595 | py | steps.py | # -*- coding: utf-8 -*-
from lettuce import step, world
from calculadora import Calculadora
@step(u'Dado que tengo el número "([^"]*)" y "([^"]*)"')
def dado_que_tengo_el_numero_group1_y_group1(step, num1, num2):
cal = Calculadora()
world.resultado = str(cal.suma((num1), (num2)))
@step(u'cuando realizo la s... |
d3bdbe0387c1ed2ddf70f8729e7cc232cc1ca121 | bf4209c0846a1c237dd996267c8eadd7717ae19e | /main.py | 787ac0162ad9d86d3d9c1c25526d4cc542880445 | [] | no_license | bulhakovolexiy/movieParser | f312fb8c0037536dea8ca15f79ec280fdcbdc129 | 72235789a26dc828ab605f63de0e7370310393ba | refs/heads/master | 2023-08-15T04:02:19.478610 | 2021-10-13T19:24:49 | 2021-10-13T19:24:49 | 415,060,286 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,211 | py | main.py | # Import everything needed to edit video clips
from moviepy.editor import *
from shot_tracker import *
def shot_text_data(shot_timings):
result_list = []
prev_shot = shot_timings[0]
for shot_timing_val in shot_timings:
result_list.append([shot_timing_val, shot_timing_val - prev_shot])
prev_... |
de6f92fb304ecccedd340bdd26b44b1b0f2ffb22 | 597c2cd3e3dc0dc073786d49448ae71c7f6c2232 | /tests/database/test_assets.py | 2cff85345a74ad32dbb86048f1442d42c9fcbdf4 | [
"MIT"
] | permissive | hueyyeng/AssetsBrowser | bc9af8265a79036faecdf4a4948fd26b40f4fa17 | eb00d495f3ed7eab3d5ef8b995f38237936037ea | refs/heads/develop | 2021-06-04T02:24:54.486268 | 2020-12-04T05:10:33 | 2020-12-04T05:10:33 | 98,713,660 | 8 | 0 | MIT | 2020-12-04T05:10:35 | 2017-07-29T06:33:49 | Python | UTF-8 | Python | false | false | 1,280 | py | test_assets.py | import peewee as pw
from pytest import mark
from database.db import Database
from database.models import (
Asset,
Category,
Project,
)
class TestAssets:
def setup(self):
self.test_db = Database()
self.category_data = {
"name": "FX",
"description": "Effects",
... |
0a2718d32ffe3a02298ef46646e167269c86edcb | b719847f06630e0a85dcaae240e242bcf2d0aacc | /testing/rename_cases.py | 18055116d01eec455dced442c7678c7bebab4333 | [] | no_license | KarchinLab/CRAVAT-aux | 7ea1d10352e1fb9a2ad735dfc7edc8ff7f771c42 | b4bb0e1f57ee96e3d88d1cd43bd7bcc3fd9c2a58 | refs/heads/master | 2018-09-23T01:35:08.664613 | 2018-07-02T20:59:40 | 2018-07-02T20:59:40 | 61,048,763 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 783 | py | rename_cases.py | import os
import shutil
import sys
test_case_dir = os.path.abspath(sys.argv[1])
case_dirs = [os.path.join(test_case_dir, x) for x in os.listdir(test_case_dir)]
for case_dir in case_dirs:
if not(os.path.isdir(case_dir)): continue
print(case_dir)
for fname in os.listdir(case_dir):
print(fna... |
d10a48db5668de178cc4d943f6a0c37d69f5d7bd | 7a61450fa3e6036eda946c418dafd39c1c871a08 | /lpgen.py | eeadbb7e68c94fe03809c22cfe2f2c1dd4e3d7cc | [
"MIT"
] | permissive | ms8r/lpgen | b8f6708b17a56d178aad76be9617d47352b006e1 | 8482f6a8eb8fbf6b1e3c7b7257c47153a714a128 | refs/heads/master | 2021-01-22T01:11:57.913631 | 2017-09-02T17:25:09 | 2017-09-02T17:25:09 | 102,210,568 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,710 | py | lpgen.py | #!/usr/bin/env python
"""
Generates a LaTeX file with a teacher's lesson planner book for multiple
week schedule cycles, prefilled with schedule data read from a csv file.
"""
from __future__ import division, print_function
import os
from itertools import product
import argparse
import pandas as pd
import jinja2 as j... |
87f5f981d46db1fc81f172f831176f6d881f9915 | 59f4bb8f78bce3e25f4278447b89817215778472 | /src/backend/app/api/public/theses/thesis/__init__.py | b669faa08bb2a33e167397a05f79bb3aedcf8874 | [
"Apache-2.0"
] | permissive | aimanow/sft | b29fd457b29f24ac0b7a1eb7749a8a20d16130f9 | dce87ffe395ae4bd08b47f28e07594e1889da819 | refs/heads/master | 2022-03-26T08:59:33.652548 | 2019-12-23T13:05:07 | 2019-12-23T13:05:07 | 220,700,598 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 132 | py | __init__.py | from . import thesis
from . import attachments
from . import thesis_votes
from . import thesis_claims
from . import thesis_comments
|
21405b49d116f58265e4adadcb6feb389cb40188 | d1f15554df2d5c0f74ddbcba6e870359841f682b | /wagtail/admin/datetimepicker.py | 1581f68d5740bce3a0aa790930961c1946fd8c9d | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license"
] | permissive | wagtail/wagtail | bd405f89b86e0c625fef0685fd6bfba41cf5cbfc | 06a7bc6124bf62675c09fbe0a4ed9bbac183e025 | refs/heads/main | 2023-09-04T06:22:51.601208 | 2023-09-01T15:22:00 | 2023-09-01T15:22:00 | 16,479,108 | 12,974 | 3,580 | BSD-3-Clause | 2023-09-14T10:45:04 | 2014-02-03T12:41:59 | Python | UTF-8 | Python | false | false | 880 | py | datetimepicker.py | # Adapted from https://djangosnippets.org/snippets/10563/
# original author bernd-wechner
def to_datetimepicker_format(python_format_string):
"""
Given a python datetime format string, attempts to convert it to
the nearest PHP datetime format string possible.
"""
python2PHP = {
"%a": "D",
... |
d9c79d7da7535128b53b87c6b2b754472b981245 | 32bcf9546d2a63a0b7980986a8b60d71efbdd8c9 | /archiemate.com/chatbot/ArchieMate/Logger.py | 5567e075e16ee5579f319bd2a1b9d06c18931b06 | [] | no_license | Warcaller/ArchiEC2 | 3fe44cab0f2e01b014d7ebf68601edad3799dae9 | 815076a05fc4a8a7d1300c5857d40eb716cd0c9a | refs/heads/main | 2023-06-24T16:22:36.315901 | 2021-07-22T14:24:55 | 2021-07-22T14:24:55 | 382,715,676 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,605 | py | Logger.py | import logging
import sys
from os import environ as env
from logging.handlers import TimedRotatingFileHandler
FORMATTER: logging.Formatter = logging.Formatter("%(asctime)-16s - %(name)24s - %(levelname)8s - %(message)s")
LOG_FILE: str = "logs/ArchieMate.log"
IRC_FILE: str = "logs/IRC.log"
DEBUG: bool = env.get("DEBUG"... |
0cfd10454f901e7741d00cd7a799924271fb84ba | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02925/s260863658.py | 6a630b45e277296fa0856a49d03a3b2c5db4d984 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,022 | py | s260863658.py | N = int(input())
A = [list(map(lambda x:int(x)-1, input().split())) for _ in range(N)]
M = N*N
def c(a,b):
if a>b: a,b=b,a
return a*N+b
G = [[] for _ in range(M)]
for i in range(N):
a = A[i]
x = i
for j in range(N-1-1):
y1 = a[j]
y2 = a[j+1]
G[c(x,y1)].append(c(x,y2))
dp ... |
6b10356681a855b0d35a0056d7d194f204a179ee | 86fa3b716f174639877dcbb137cd4da1b8340745 | /scripts/OM_old2017experiments/2_createAndFillDatabase/profileTimeTest.py | 31fdb6027bb95e57ea551e8b72e9a90917d17277 | [
"MIT"
] | permissive | pandrich/MyAIGuide | dbedac3b3390d8364349bfe45ea6c7e10486c0c0 | 84d346f346d4e91c77808f4a922c053e2622a5e5 | refs/heads/master | 2023-03-25T02:29:14.416747 | 2021-02-27T11:30:02 | 2021-02-27T11:30:02 | 342,620,790 | 0 | 0 | MIT | 2021-02-26T15:39:33 | 2021-02-26T15:39:32 | null | UTF-8 | Python | false | false | 2,330 | py | profileTimeTest.py | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 5 11:53:04 2016
@author: Olivier
"""
import time
import createDataBase
import dataset
import numpy as np
class painTab:
m = np.array(
[
["year", 1, "int", 1],
["month", 1, "int", 1],
["day", 1, "int", 1],
["l... |
1a764eeff683518b4590fb070444497f1539d6ee | 7700f6fefcb40afa3ca75d27b01ccd928356df87 | /007_Samples/module_math.py | f98cfc45410c42d7490b790c08514bb0e38c31a6 | [] | no_license | vsvdevua/python_basic | 1683c31b65d04698c83d4213bfe5f92702eb11d0 | 3c61ee630f7277444b8f4685bb8c62b6a711af14 | refs/heads/master | 2023-08-07T21:55:43.951613 | 2021-09-26T15:03:59 | 2021-09-26T15:03:59 | 410,582,942 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | module_math.py | import math
print(math.sqrt(16))
print(math.pi)
print(math.e)
print(round(2.1))
print(math.ceil(2.1))
print(math.floor(2.99999))
print(math.isnan(math.nan))
print(math.exp(2))
print(math.log(8, 2))
|
a58e6d0c978c6bf6e3b4a9b2039ac31c19870b32 | 65000cd14ccd9cd72256ff20c1b86590626676b0 | /list_comprehension.py | ec920f245cf79fdbe5f00ff27d35915b2e63cb24 | [] | no_license | sindhu-vedala/Python-Practice-Challenges | 80374716491a774207f73206236f78a247fd4053 | 2b2a37495399d09f74b1b27ca3295ef4917cd221 | refs/heads/master | 2020-12-06T02:05:58.606261 | 2020-10-29T18:38:42 | 2020-10-29T18:38:42 | 232,310,423 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 828 | py | list_comprehension.py | if __name__ == "__main__":
X = int(input())
Y = int(input())
Z = int(input())
N = int(input())
# X=1
# Y=1
# Z=1
# N=2
output_list = []
# for i in range(X+1):
# print('Iteration i - ',i)
# for j in range(Y+1):
# print('Iteration j - ',j)
# ... |
81c580689164d42c2fe4c8158319924da231daa5 | 3b786d3854e830a4b46ee55851ca186becbfa650 | /SystemTesting/pylib/vmware/interfaces/traffic_verification_interface.py | ca1a59da4fc49759266cd724abd074dc38af870e | [] | no_license | Cloudxtreme/MyProject | d81f8d38684333c22084b88141b712c78b140777 | 5b55817c050b637e2747084290f6206d2e622938 | refs/heads/master | 2021-05-31T10:26:42.951835 | 2015-12-10T09:57:04 | 2015-12-10T09:57:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 677 | py | traffic_verification_interface.py | class TrafficVerificationInterface(object):
"""Interface class to implement traffic verification related operations."""
@classmethod
def generate_capture_file_name(cls, client_object, **kwargs):
raise NotImplementedError
@classmethod
def start_capture(cls, client_object, **kwargs):
... |
6d85642d4ac8af5508b21c7459b9e04ae2f15b70 | fa3143bf5d87a6afe6cf947b74481d29939de686 | /greeking/templatetags/greeking_tags.py | 8b5b1f18bbdff1e76af82e53ed1f9a518d60f065 | [
"MIT"
] | permissive | palewire/django-greeking | 7b8116d950f6ed58bd20f20f357075945c3c5a07 | 81270c30bc34d80a7e92a246cd1ce70f1d26ad0c | refs/heads/main | 2023-08-18T08:36:58.155690 | 2023-08-02T13:49:52 | 2023-08-02T13:49:52 | 133,741 | 36 | 3 | MIT | 2023-08-14T23:45:25 | 2009-02-21T00:41:21 | Python | UTF-8 | Python | false | false | 4,145 | py | greeking_tags.py | from django import template
from django.utils.html import format_html
from greeking import quotables
from greeking.fillmurray import get_url as get_fillmurray_url
from greeking.jabberwocky import get_grafs
from greeking.jabberwocky import get_html as get_jabberwocky_html
from greeking.latimes_ipsum import get_quote, g... |
fec6f8e100754638a543b939544bcb8c095e445b | 757297784c8490d27688d9262b950778e1771b62 | /python/test_peoples.py | 41826fb6fbeb3c0eb6d9a9728c3001edb89d7df7 | [
"MIT"
] | permissive | mgasiorowski/swapi_tests | bf137aac682f14f0617b344cfa8b9d18fad8f234 | 8af6809f40a95fa5c415bb7ddc375040a010b5bd | refs/heads/master | 2021-01-23T10:22:02.419299 | 2017-10-16T16:02:09 | 2017-10-16T16:02:09 | 102,612,122 | 2 | 0 | null | 2017-10-16T13:48:13 | 2017-09-06T13:30:11 | Python | UTF-8 | Python | false | false | 752 | py | test_peoples.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from api.people import People
class TestPeople(object):
def test_should_get_all__return_200(self):
response = People().get_all_()
assert response.status_code == 200
def test_should_get_person_return_proper_content_type(self):
content_typ... |
d4386626761aea40a99d0e2001aa4ace17c0d6f3 | 790d5228ab2368b79b565e38809c2a83be643c41 | /algoSdk/api/IasBuild.py | acdff834ade61e020fdeb3efcd818e59390a856f | [] | no_license | Alexanderme/algorithm_testing_platform_django | 36a6e7c40c6597ef6a4fbaf63a0201c8dedab1f1 | bf3198f1b04e1628009c4af6495cbebd784eae95 | refs/heads/master | 2023-02-18T19:36:28.012662 | 2021-01-24T11:35:00 | 2021-01-24T11:35:00 | 318,422,824 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,327 | py | IasBuild.py | """
# @ModuleName: IasBuild
# @Function:
# @Author: Ljx
# @Time: 2020/12/4 14:32
"""
# Create your views here.
from rest_framework.views import APIView
from rest_framework.response import Response
from ..serializers.serializers import IasPackageSerializers
from ..common.sdk_function import docker_bu... |
5d09284c1abb2fd3a51beb3c72e4d980c1bfd35f | bf683eb4a6080cf67669de90d1afdad53fccb738 | /Scripts/ict/viewflow/flow/views/list.py | 6334709ef54d9b4363349a9daf8aed968ccb7b88 | [
"MIT"
] | permissive | mspgeek/Client_Portal | cd513308840aa4203554ebc1160f17f0dd4b17cf | 0267168bb90e8e9c85aecdd715972b9622b82384 | refs/heads/master | 2023-03-07T21:33:22.767108 | 2020-04-08T01:43:19 | 2020-04-08T01:43:19 | 253,946,635 | 6 | 0 | MIT | 2022-12-31T07:01:43 | 2020-04-08T00:43:07 | HTML | UTF-8 | Python | false | false | 6,471 | py | list.py | from __future__ import unicode_literals
from django.views import generic
from ... import activation, models
from .mixins import (
LoginRequiredMixin, FlowViewPermissionMixin,
FlowListMixin
)
class AllProcessListView(LoginRequiredMixin, FlowListMixin, generic.ListView):
"""All process instances list avai... |
0743386dbee82fcdd9ff952d8d8d8e10af302023 | a9ed0ac02ef7afc962688ce75f12301a005acbec | /BasicExercise 05.py | 2e2760f72e9e83a4dd59de34bad1091cfcb4a035 | [] | no_license | RosaPetit/Python-I | 2d52999b1a36698c3365464e85617450ec89f64a | 2f75d1bb9cfa370a7d6370befb0091e1f707d9b6 | refs/heads/main | 2023-06-18T15:13:09.513761 | 2021-07-17T18:46:59 | 2021-07-17T18:46:59 | 375,453,838 | 0 | 0 | null | 2021-06-09T18:41:29 | 2021-06-09T18:28:53 | null | UTF-8 | Python | false | false | 415 | py | BasicExercise 05.py | #!/usr/bin/env python2.6
#_*_coding: utf8_*_
from math import *
import os
nombre= raw_input ("Escriba el nombre del archivo de salida: ")
formul= raw_input ("Escriba una formula (la variables es x): ")
try:
archiv = open (nombre, "r")
except IOError:
print "El archivo no puedo abrirse"
exit()
for x in range(0... |
ca9fe3ceaec3300f4127844817dbcf5f8b686447 | e1963e26efac9785415879cf9900e97a948b831b | /src/meshine_project/meshine_api/search_indexes/documents/category.py | bd7b041c0515cc137967e52e32994c65a45f1f21 | [] | no_license | kabrice/MeShine-Studio | e9635ae2b1329b1c887f3c93787b21ef14994ea0 | 6c39361a2dbe4786f2e8b4381440065cb77f108a | refs/heads/master | 2022-12-08T10:53:59.528533 | 2021-03-27T02:48:41 | 2021-03-27T02:48:41 | 114,959,401 | 0 | 0 | null | 2022-12-08T01:04:59 | 2017-12-21T03:43:18 | HTML | UTF-8 | Python | false | false | 2,328 | py | category.py | from django.conf import settings
from django_elasticsearch_dsl import DocType, Index, fields
from django_elasticsearch_dsl_drf.compat import KeywordField, StringField
from meshine_api.models import Category
from .analyzers import html_strip
from elasticsearch_dsl.analysis import (
CustomAnalyzer,
CustomToke... |
1684dd8d2d77802b93f5f8777c1d87435afead9b | 61004e474b7b2ad0071c16766f0f7874f04f9466 | /tools/cloud-composer-backup-restore/composer_br/gke_utils.py | e7c970f9343d822b5217548fbd5e3c682d08def5 | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/professional-services | eb79751efae765a8c691a745e520f44f51bd715c | 0f51121b945bd74c7f667e74e8861fceda87565c | refs/heads/main | 2023-09-05T02:57:33.328973 | 2023-08-30T14:40:30 | 2023-08-30T14:40:30 | 91,730,359 | 2,626 | 1,381 | Apache-2.0 | 2023-09-14T20:13:42 | 2017-05-18T19:29:27 | Python | UTF-8 | Python | false | false | 6,157 | py | gke_utils.py | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
4764a536b3f3b888991b70feaab561013dc1bc68 | 54f8cab73f2e95da4ea565f721ae131a430bd482 | /cmsplugin_featuresite/settings.py | 2bd39d98069abd7006d610e1e3225997d3b30c52 | [] | no_license | django-cms-plugins/cmsplugin_featuresite | 4e495a323df5bc98751f70d7f30c9fc9cf76f282 | 5c8c87d035444f1e9b487ae42bb4ca5287d186dc | refs/heads/master | 2021-01-22T05:47:09.749774 | 2013-11-19T13:24:11 | 2013-11-19T13:24:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 143 | py | settings.py | from django.conf import settings as django_settings
SIMPLENEWS_PLUGIN_MENU_INDEX = getattr(django_settings, 'SIMPLENEWS_PLUGIN_MENU_INDEX', 1)
|
822d732f1654f065d7e5374b1eddaa066933081d | 23c4f6d8a2a6b97077628c2a012b2b402c816d91 | /LeetCode算法题/0315_计算右侧小于当前元素的个数/右侧小于当前数组个数快速排序.py | a7eeaad7cd55adf16418eda410e85491b4dcdc62 | [] | no_license | exueyuanAlgorithm/AlgorithmDemo | 7ef6ff8104e8da5a81037795184115fb0ac8ca9a | d34d4b592d05e9e0e724d8834eaf9587a64c5034 | refs/heads/master | 2023-07-16T19:00:05.664780 | 2021-09-04T11:31:07 | 2021-09-04T11:31:07 | 277,327,574 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,030 | py | 右侧小于当前数组个数快速排序.py | class Solution(object):
def sortNums(self, nums, i, j):
if i >= j:
return
min = i
max = j
while i < j:
while i < j and nums[i] >= nums[j]:
j -= 1
else:
temp = nums[i]
nums[i] = nums[j]
... |
4484f48260f8798833fb2818251cd32456984a99 | a314bb66c5d30b9f3057a11e6988db24a643e8b6 | /office365/mail/itemBody.py | 8fc8bb3006c7ac8c1112bc38b66b217d04ce87b7 | [
"MIT"
] | permissive | iglimanaj/Office365-REST-Python-Client | 4f6c58b5beb8e4292e6333a6d713b336b41adfbe | 2c04461d6b3c97309bd05e880d74b5aac93e9529 | refs/heads/master | 2023-06-26T22:47:00.546632 | 2021-07-30T09:12:10 | 2021-07-30T09:12:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 353 | py | itemBody.py | from office365.runtime.client_value import ClientValue
class ItemBody(ClientValue):
""""""
def __init__(self, content=None, content_type="Text"):
"""
:type content: str
:type content_type: str
"""
super(ItemBody, self).__init__()
self.content = content
... |
09b5df5dd70294d89b63edc83d2789387fca98ce | 2f5d692ea7579dc78a2aea4cbaf7119c2cebbfa4 | /app/resources/updatable_mixin.py | 5c7027ac1debfa1390da3b94c9df054353a7eaeb | [] | no_license | Cerikoff/forum_test | dfba8b9cc771ac01ed47c515d0d4f5208461fdba | 87b1007b6c1d23ae14c9a3599f63184a29e6ccff | refs/heads/master | 2023-03-25T00:34:46.506301 | 2021-03-18T21:52:04 | 2021-03-18T21:52:04 | 349,226,155 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 621 | py | updatable_mixin.py | from psycopg2 import sql
class UpdatableMixin():
def _update(self, id, tablename, updatable_fields, conn, **kwargs):
fields = []
for field in updatable_fields:
if field in kwargs:
fields.append(field)
query = sql.SQL('update {} set ({}) = row({}) where id=%(id)... |
38b9f1b76b607bfcb0c6a20a9b27f8a3faa61d4e | 015b605e8b88538f7d8c10f8a64d4f84b6e3bfc5 | /tests/test_responses.py | f12a341f0ea82ff1a76420f57ee0b0658003e3e2 | [
"MIT"
] | permissive | aiopymake/aiorequest | 9b39d1b813dd0b5749f5867c06379668b9cf8144 | f08d75144ea958feb2826c0e4d5138df844cb7dd | refs/heads/master | 2023-05-25T03:21:29.546591 | 2021-04-18T05:50:30 | 2021-04-18T05:50:30 | 268,039,314 | 6 | 1 | MIT | 2023-05-22T23:29:05 | 2020-05-30T08:27:15 | Python | UTF-8 | Python | false | false | 2,574 | py | test_responses.py | from typing import Iterable
import pytest
from tests.fake import FakeHttpResponse
from aiorequest.responses import HTTPStatus, Response, ResponseError, safe_response
from tests.markers import asyncio, unit
pytestmark = [unit, asyncio]
@pytest.mark.parametrize( # noqa: PT006, PT007
"status, expected",
(
... |
761955c20dd8dcf6be6b8a7d9c4a887ba4aeacc3 | 57c79dae54eff6344d94d91aa046147a36eecd2e | /cart/cart.py | a1be36ae759a67aec809855763ad8d323908288a | [] | no_license | lwbvv/shop | a986623d1bb687457bc2962e1cb78562b0d6ffaf | 4665404698b71233276001bdbd1c37225949922a | refs/heads/master | 2021-05-16T22:35:07.214532 | 2020-04-07T13:01:23 | 2020-04-07T13:01:23 | 250,495,747 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,312 | py | cart.py | from decimal import Decimal
from django.conf import settings
from shop.models import Product
from coupon.models import Coupon
from log import log
class Cart(object):
def __init__(self, request):
self.session = request.session
cart = self.session.get(settings.CART_ID)
if not cart:
... |
eb9c0eae3ec621549b4181e888a8073ebde9ce86 | d5b43fdf8e71d3099f5143875ba40a934a835491 | /drive.py | 7f6f65853ff665b78b938dd10ab3cbf4fbdbd75b | [] | no_license | PedroUnifor/behavioral-cloning-one-camera | ba314f5bb4e987ca84b3662f3d716f713a43c2c9 | e2e1052174bc6d8afa94c58d423230c3fb963691 | refs/heads/master | 2020-04-01T18:46:43.671619 | 2019-05-14T11:57:05 | 2019-05-14T11:57:05 | 153,514,047 | 0 | 2 | null | 2018-10-17T19:43:05 | 2018-10-17T19:43:05 | null | UTF-8 | Python | false | false | 2,573 | py | drive.py | import argparse
import base64
from datetime import datetime
import os
import shutil
import cv2
import numpy as np
import socketio
import eventlet
import eventlet.wsgi
from PIL import Image
from flask import Flask
from io import BytesIO
import urllib
import rospy
from geometry_msgs.msg import Twist
from keras.models i... |
e4710616c93270df302625ea7cd18317bdc55c6c | 2dcb9a05c14d6bca5c2f505a3ef09c3b70c45e28 | /Stack/BackspaceStringCompare/Solution.py | 31ba2557e6de4f547b75b969fd40a3651d4867d2 | [] | no_license | minhyeong-joe/leetcode-challenge | 084e7298397e2bf0cdf931920d57ac61746d4be3 | 77d44f01f93005659db94b4af9cf121c004075f1 | refs/heads/master | 2023-02-13T08:03:52.850151 | 2021-01-16T02:00:06 | 2021-01-16T02:00:06 | 282,050,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,973 | py | Solution.py | from itertools import zip_longest
def backspaceCompare(S: str, T: str) -> bool:
sStack = list()
tStack = list()
# add characters into each stack, pop if it sees backspace '#'.
for ch in S:
if ch == '#':
if sStack:
sStack.pop()
else:
sStack.append(... |
db2b010b1fccaff1e16e766815834c6503ada925 | 70bcf8429a7c6f878979357f96811dadb88be45b | /tests/test_benchmark_quadratization.py | b813c29c333b2f8ac9ead02f96d6f1668888b897 | [
"MIT"
] | permissive | AndreyBychkov/QBee | 484c7645cf9882dfc556b3981705248f5e41cbd2 | c413e146e6ca99dd1aa836ab2ec070dd0565c62a | refs/heads/master | 2023-08-03T09:47:29.556161 | 2023-07-19T16:07:26 | 2023-07-19T16:07:26 | 226,230,012 | 7 | 2 | MIT | 2023-07-19T16:07:28 | 2019-12-06T02:31:51 | HTML | UTF-8 | Python | false | false | 912 | py | test_benchmark_quadratization.py | import pytest
from qbee import *
from examples import *
from functools import partial
@pytest.mark.benchmark
@pytest.mark.parametrize('ord', [3, 4, 5, 6])
def test_circular(benchmark, ord):
benchmark(partial(quadratize, generate_circular(ord)))
@pytest.mark.benchmark
@pytest.mark.parametrize('ord', [3, 4])
def ... |
280d1ed6ca8c579aede0cabe639ca3c3c5b30336 | 23b3f8de4083813a3003cd7b7789c2f0e4a47270 | /pfg/template.py | e3c66b14e40978430dd79068526fd597c92b49a6 | [
"MIT"
] | permissive | michaelfreyj/pfg | 34fe48f5094786cea6a0fb488ee7afd558a53626 | 25397a5539852667ea4ab55bc47511b488c63404 | refs/heads/master | 2023-03-12T15:49:52.690438 | 2021-02-26T02:22:05 | 2021-02-26T02:22:05 | 266,807,938 | 0 | 0 | MIT | 2021-02-26T02:22:06 | 2020-05-25T14:59:22 | Python | UTF-8 | Python | false | false | 10,502 | py | template.py | # vim:fdm=marker
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from copy import deepcopy
import configparser
import logging
import os
from pathlib import Path
import sys
import time
import yaml
from .input_utils import choice, yes_or_no
from .template_utils import check_templates
log = logging.getLogger('pfg.Templat... |
e73071eb26d853b191926ec64479c3099e415fca | c515fd655492fea6a2eba5f56e0aab7b157c4745 | /casting/migrations/0003_auto_20180103_2319_squashed_0004_auto_20180103_2353.py | 52952571d4addf885d5a4271abb546d421ca5fcd | [] | no_license | aolkin/hrdc | 9c817dd3d116c8d067c750056ae70e8eaea5a085 | c673b5fce3817fd63a70f11b5f82848e39d34f18 | refs/heads/master | 2023-07-25T01:03:51.321896 | 2023-07-17T02:12:30 | 2023-07-17T02:12:30 | 96,379,907 | 0 | 1 | null | 2023-07-17T02:12:33 | 2017-07-06T02:28:13 | Python | UTF-8 | Python | false | false | 2,141 | py | 0003_auto_20180103_2319_squashed_0004_auto_20180103_2353.py | # Generated by Django 2.0 on 2018-01-04 04:53
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import dramaorg.models
class Migration(migrations.Migration):
replaces = [('casting', '0003_auto_20180103_2319'), ('casting', '0004_auto_20180103_2353')]
... |
baa6d5757fd6e6c699df9d49041e0c93991d3025 | 97658e79ac16e36dfad8055c4d19e08be61f4234 | /python/learning/base/ifelse.py | 4adad57d7810b951da5c5e581855000213659f63 | [] | no_license | DavideB45/DavideUnipi | 09eca33fb2d82f4e43baf23a3c36d016036e4ecb | c3c498c8d4b45f7d554f1748e1c78d0e368b9004 | refs/heads/master | 2021-07-12T10:26:52.778423 | 2020-11-09T13:07:40 | 2020-11-09T13:07:40 | 221,219,602 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | ifelse.py | A = 2000
B = 0.1
if A > B:
print("Yes")
print(2000 > 0.1)
condition = True
if condition:
print(condition)
else:
print(not condition)
condition = "4"
if condition == 4:
print("there's no more religion")
else:
print("at lest this, ty")
#cast
condition = int(condition)
if condition == 4:
print("OK")
else:
prin... |
ef7f19a68c3a16bda8ad8e824da58dccd2035ff7 | f455baf8ae4478efef5e3a4798b1741ca623beac | /source_types/__init__.py | e7af0fcd88c6af64627bfc16fa09ed3c00ea8892 | [] | no_license | rotimi-best/scripture_rec | 302112ba095e86a23c456f4463ae534b23533477 | f73ebc8677aa0f9f96d806db05d602a2985d6f82 | refs/heads/master | 2022-10-03T07:31:28.457323 | 2020-05-30T05:34:05 | 2020-05-30T05:34:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | __init__.py | from source_types.bible_object import Bible # noqa
from source_types.recommendations_source import RecommendationsSource # noqa
|
e2f4e2264f044f98e30efd5225022141a473578c | 8e8c5977977f0836e7f1ec9684d08bf8ce2006f7 | /run.py | 20bbd946009aaea58273ba1d999a467bbb4093a0 | [] | no_license | sashaudalv/clustering | 9020bff3d2d46fb6985b28713bbe8ed3555645a9 | 92e69d7d2fa98fd20cf64e98683678e481ee04d0 | refs/heads/master | 2021-01-19T00:46:31.267576 | 2017-04-04T17:39:27 | 2017-04-04T17:39:27 | 87,206,299 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,565 | py | run.py | from sklearn.cluster import KMeans
import numpy
file_path = './number_pairs.txt'
clustered_pairs_file_path = './number_pairs_cluster_%i'
def load_pairs():
pairs = []
with open(file_path) as f:
lines = f.readlines()
for line in lines:
pairs.append(tuple(map(float, line.split(' ')))... |
f4493a8fed20b88367d0fc63f2784a580cca58d1 | edf8004b1981dc4a81b9549f4dfb50fb998a5240 | /src/picasso/gui/programs/optimization.py | 209bed6aaecdd8828c69a15f91a08757709b4cfa | [
"MIT"
] | permissive | goodcq/picasso | 64597d148ccb2c2c50c00cee8961c5a4c63334a7 | 89948b1707f44ca03c566da1d4424d9bc208e380 | refs/heads/master | 2022-01-22T11:12:36.348096 | 2019-07-29T09:55:23 | 2019-07-29T09:55:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,898 | py | optimization.py | # -*- coding: utf-8 -*-
"""
Created on Wed May 9 14:59:20 2018
@author: sreimond
"""
import os
import numpy as np
import uuid
import time
import subprocess
import shutil, tempfile
from picasso.utils.dates_and_time import date_functions
from picasso.gui.programs import groops_interface
from picasso.utils.algebra impo... |
b8a0672ce443503a79efc93fb34cb45c7df11f30 | 362f735b711373ed05e69289b152cbd4d41aad68 | /class_tsprite.py | 04eec4efe5170d16dfb0b17645438e68b6e287b8 | [] | no_license | zoyter/clicker | 681015e35ee95dabcaeaf669d9aa03b10e2929aa | 5dca54dcb72f1042b2ed6dc4daa24cfb9d850019 | refs/heads/master | 2021-09-05T22:19:08.911602 | 2018-01-31T09:48:44 | 2018-01-31T09:48:44 | 119,663,842 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,968 | py | class_tsprite.py | import random as rnd
import pygame as pyg
from pygame.locals import *
from common import *
class TSprite(pyg.sprite.Sprite):
def __init__(self, fname,x = 10,y = 10):
super().__init__()
# Загрузка картинки
self.image, self.rect = loadimg(fname)
# Цвет текста под спрайтом
... |
808f19717931163ec281b86125bdafafd5cae3d1 | db54961b58b4bc8a1444b7c576542d169a198cb2 | /wt_ref_content_hub.py | f674fa9fadd435e2489bd39aafe174b58cabb109 | [] | no_license | pnuttbutter/pinpoint | 5a77411fa7a5b1b7fb6878460f72d3b2bee9b3ad | 45eee7e04b6e1d3bb7a0da238b00f4825c7bec8a | refs/heads/master | 2021-01-10T06:20:11.587156 | 2015-12-22T15:12:11 | 2015-12-22T15:12:11 | 48,429,581 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,217 | py | wt_ref_content_hub.py | ## content hub monthly
## populates the content hub collection with articles from the previous month
## imports
from datetime import datetime
from pymongo import MongoClient
from bson import json_util
import urllib2
import json
## mongo variabes
host = '127.0.0.1' #local
port = 27017
database = 'wt_ref'
collec... |
0ffb853daef3140e4e1044c488ccb637e2e04dc0 | e8c43b5a06882c9c226f1648a0eeed2bc5883518 | /1satır.py | e02c027e0f2db15c63a6d4dad56daa00b0536397 | [] | no_license | mehmet-efe61/Python | c680e393357166e99147ac2b13004518c962d4f3 | cc096378445260e7ea4e8a94533873bd446647b0 | refs/heads/master | 2021-01-23T04:58:15.617484 | 2018-10-29T20:03:12 | 2018-10-29T20:03:12 | 86,256,192 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 118 | py | 1satır.py | print(int(input("Dikdörtgenler prizmasının hacmini bul:\nKenar uzunlukları nedir?\n"))*int(input())*int(input()))
|
86ad8ed7c59c8a4100062722b19023975a4ecac6 | 739e91039c05943352a3fc07e768641f74097482 | /BaekJoon_Online/Dynamic_Programing/No_2193.py | cd9a9406f501a56f62d16d64f3d0a341f6a1750c | [] | no_license | doublejy715/Problem-Solve | 651182079ded1a9da3478dd30a4c4507894de85e | 57d5a672a48103769c8cc022cb7132d988624600 | refs/heads/master | 2023-07-13T09:51:23.145427 | 2021-08-31T04:35:04 | 2021-08-31T04:35:04 | 234,250,382 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 256 | py | No_2193.py | # 피보나치 관련있다.
def Solve(n):
if n == 1 or n == 2:
return print(1)
else:
dp = [1,1]
for i in range(2,n):
dp.append(dp[i-1] + dp[i-2])
return print(dp[-1])
number = int(input())
Solve(number) |
283b9ac423d2ddcfd69effa4fe705f5243377c99 | ff7a7ae752a0c4383841f78b384d1d4be24bc90e | /numeros5.py | ab4734ed1bbbc093b6a9cb65188b1e1f7fae4251 | [] | no_license | FranciscoJavierVH/Scripts-pyhon-crash-course | 2b779517d995c11a09454259cfcfc0d1922f12ea | 657baaa204a4272dd5ba717728c5b1672de733e1 | refs/heads/master | 2020-05-31T21:56:18.859872 | 2019-06-06T03:57:42 | 2019-06-06T03:57:42 | 190,509,783 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7 | py | numeros5.py | 2*3
#6
|
69d384b9950ed091f69bd7dcc5d848617b244a00 | eb0cfb8cec9760cea2a5a086d8ce9d35d964df20 | /projects/models.py | 087983be40df435f633e9bf6a0f4d784aeaa8be1 | [] | no_license | Effessio/task_mngr | 7e30753d65fa02e771d7615dced834d179139e35 | 95de8b18dd20c2f3517a95a9391cee9fc3203428 | refs/heads/master | 2021-01-20T08:44:07.227372 | 2014-04-09T07:15:27 | 2014-04-09T07:15:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,529 | py | models.py | # -*- coding: utf-8 -*-
from django.db import models
from users.models import User
class Project(models.Model):
title = models.TextField()
created_at = models.DateTimeField('date created', auto_now_add=True)
updated_at = models.DateTimeField('date updated', auto_now=True)
is_public = models.BooleanFi... |
6f34aefca30e6bdcb9bde01ac27916b6fc1311de | 484b24b9e0439dd5b3a6dd3cb5ac3af95d65499e | /SensorGenerator/test_temperature_sensor.py | df40c47489e345b020a3b02e4be2c4e8d4ade330 | [] | no_license | patex1987/SensorTransmitter | c5a5356a982916b5d6c4313833e4c792141713b5 | a118ecf199715faba13ec77e54e90397dce7c570 | refs/heads/master | 2021-05-09T23:45:28.295408 | 2019-04-10T10:22:40 | 2019-04-10T10:22:40 | 118,808,629 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,367 | py | test_temperature_sensor.py | '''
Created on 24. 1. 2018
@author: Patex
'''
import time
import datetime as dt
import pytest
from sensor_generator import Sensor, OutOfBoundException
@pytest.fixture
def sensor():
'''
returns a basic TemperatureSensor object
'''
return Sensor(min_value=20,
max_value=80,
... |
fd00f605fd1c41b7b85cdb5f8bc4f9d646d1cf5a | 17dde51ba1e7e8ce92c4c9d13c49c2a88dfb59bc | /main.py | c15498bb2fee79f0dd2620335bc8202144265f74 | [] | no_license | subashch6/519401_ClassProject | e0bd893eb3242a7ec03e2815951f8e7f9362ddc6 | 64e48f27ddf4dbe1c2c036a2bd629e22df9a3150 | refs/heads/master | 2020-08-26T17:31:16.308194 | 2019-12-14T01:35:03 | 2019-12-14T01:35:03 | 217,089,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,139 | py | main.py | import pandas as pd
import numpy as np
import random
import torch
import torch.nn.functional as F
from torch.utils import data as torchdata
import random
from DenseModel import DenseModel
from CnnModel import CnnModel
model_type = 'dense'
use_cuda = False
print(model_type)
model = DenseModel(100)
if model_type != '... |
82b0fd6fc6b2e4aa3dd09dbf0f5dac85677ccfd4 | 580cf5ae3dcedd2d244f056d0d70011848004083 | /model/summarize.py | 2fc2f44cae8f72f9a9c4c9033f4d5b48ea325682 | [] | no_license | mqk/DelayMeNot | d1c4c6691b3638c3cf903a2856cc73dece51ce74 | 939dbb49f4c3fc82690f41f768b0a22f517dec2d | refs/heads/master | 2020-12-24T15:23:36.914298 | 2013-10-04T00:49:31 | 2013-10-04T00:49:31 | 12,550,886 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,845 | py | summarize.py | import numpy as np
def summarize(Y,Ypred,quiet=False):
error_rate = 1.0 - float(sum( Ypred == Y )) / len(Y)
ind = (Y == 0)
false_positive = 1.0 - float(sum( Ypred[ind] == Y[ind] )) / len(Y[ind]) ## on-time flights classified as late
false_negative = 1.0 - float(sum( Ypred[~ind] == Y[~ind] )) / len(... |
b8d961d983a1a491560211991dc8225183b166a6 | f31f97a79d74bd8ff69f4b8e9665026daec4a8c5 | /python_crash_course/ch04/threes.py | 7841473d60e6bbe9996a40591dbae68f58292b0e | [] | no_license | sillyfish/learn-python | 9c02c0109347fea479c4b1d5d8e2ac84af91fb75 | 72e084dd6e09325530447c2886f43fafd725dbb3 | refs/heads/master | 2023-08-06T03:18:40.667342 | 2023-07-28T09:19:18 | 2023-07-28T09:19:18 | 245,551,889 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 164 | py | threes.py | """
Title:
Date: 2023-03-31 19:56:55
LastEditTime: 2023-03-31 19:56:55
Category:
Tags:
Slug:
Authors: 惊人不易
Summary:
"""
threes = list(range(3, 31, 3))
|
478bf8cce51dfbb488283ba7a26399e409ba8a6a | bae35ce2f1d41350c1a269468c3868c7295fbc2e | /cash-machine.py | 8d29704ef660f06de9aecb7592e989df1667ed0c | [] | no_license | LopesAbigail/UFABC-PI-2021 | 18abc6385324a3c98d7353936f778c04c19f5c07 | 9113962d4810c4d7ee2d1f3ec2d09ab4284e1164 | refs/heads/main | 2023-07-10T22:52:23.907669 | 2021-08-05T03:44:59 | 2021-08-05T03:44:59 | 373,034,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 822 | py | cash-machine.py | bank_note_input = float(input())
bank_notes = 100 # inicializa com o maior valor disponivel no caixa
count_current_note = 0
count_bank_notes = 7 # 1, 2, 5, 10, 20, 50, 100
while count_bank_notes > 0:
if bank_note_input >= bank_notes:
bank_note_input -= bank_notes
count_current_note += 1
else:... |
6cf69f48806350b04f24fb407f7ea61fcc757ef4 | 05e186e45c45bed8bc032dd1fe7c0690ead2029b | /Granjas/urls.py | 9bb942f53afb754fdcbeaf81fe311ae40d4b99ee | [] | no_license | jturizo2/GranjaAPP | 398d172edff30eaa33eda06325766bfc9b40fb19 | bf074053ef314a8addab30c7b5654497333e9b8e | refs/heads/master | 2022-11-30T06:08:40.480875 | 2020-08-08T20:23:43 | 2020-08-08T20:23:43 | 256,803,423 | 0 | 0 | null | 2020-04-21T02:05:57 | 2020-04-18T16:42:07 | JavaScript | UTF-8 | Python | false | false | 2,134 | py | urls.py | from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth.views import LoginView, logout_then_login, PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, PasswordResetCompleteView
from django.urls import path
from django.urls import reverse_lazy
from django.contr... |
be1169b056630156aa804a85e85de93c8043d5bb | d36975caedab71aaaac26156105afaf59448e445 | /机器人视觉/3.人工智能的多彩世界/猫狗识别_数字识别_验证码识别_tensorflow/验证码识别/input_data.py | ab5b158f930f991f907031473df19ddcf7e1dd87 | [
"MIT"
] | permissive | mukgong/AI-robot | 3d84b444ac8d1a0cdb061eda19bb9319c9af036e | f89d91b67705878d9e87ae09a35b436495b66707 | refs/heads/master | 2022-12-25T01:07:37.174852 | 2020-10-05T01:44:50 | 2020-10-05T01:44:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,031 | py | input_data.py | import tensorflow as tf
import os
import numpy as np
# size
img_width = 60
img_height = 20
def oneHotlabel(len,str):
labels = []
for item in range(0,len,1):
labels.append(int(str[item:item+1]))
return tf.one_hot(labels,10,on_value=1,off_value=None)
def get_files(file_dir):
images = []
labels = []
for file i... |
466f8a1f217cb49e8c58a84e50a6d3759c17c2be | 86a5eac723bbd2592decec1777154829387f12f3 | /back/events/tasks.py | 0274a3a0eff35e52fc571c910e7c8208ee1caaf0 | [] | no_license | llownall/event-service | 5c634ca6e6244c96b167e7d1130fc63dc5192478 | 07f53e8bfc12273d85e84c136a1ae08b1efd14ed | refs/heads/master | 2023-04-30T05:56:02.968918 | 2020-06-24T08:27:07 | 2020-06-24T08:27:07 | 274,613,907 | 0 | 0 | null | 2021-05-11T18:29:51 | 2020-06-24T08:16:26 | Vue | UTF-8 | Python | false | false | 496 | py | tasks.py | from datetime import timedelta
from background_task import background
from django.contrib.auth.models import User
from django.utils import timezone
from events.models import Event
@background
def notify_user(user_id):
user = User.objects.get(id=user_id)
for event in Event.objects.filter(user=user).filter(wa... |
513c86d055b801fafbeb41c469f55e1e67afad67 | a2c67a50b9caf4cd5a716dd9a03b8dd6e29caa65 | /testing01.py | 49214e4b9aa2fb33481135b9393ecc3777a6e8fd | [] | no_license | franciscomesa/wikipedia-canarios | 9446312184ad274eadbe41257d18fdc4c9622811 | b10a89549890b400802bb521d9efc59f8b1a021d | refs/heads/master | 2021-01-07T12:04:26.599925 | 2020-03-09T01:13:45 | 2020-03-09T01:13:45 | 241,686,028 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,784 | py | testing01.py | import wikipedia
#import mediawiki as pw
import urllib
import json
import wikipediaapi
from bs4 import BeautifulSoup
#import pprint
import pickle
totalcanarios = 1
paginascanarios = {}
# https://es.wikipedia.org/w/api.php?action=query&list=categorymembers&cmpageid=132668&format=json&cmlimit=500
# https:/... |
8cd582915c5abd96a4ef8a3a5309311f2a73a156 | 39eb7c28097d8679fa2720283c82c9dbe39c0226 | /test2.py | ffc32c189b8cc7047baf25f37c9e80173129cc41 | [] | no_license | sirajece2010/Python-Learning | 22dddc924d8a688b6c01b16b022af330af0c2f74 | af8de25c8c62aea4246bc2ab5b67a39ae108ad7f | refs/heads/master | 2021-08-05T10:36:33.253908 | 2020-05-15T08:59:56 | 2020-05-15T08:59:56 | 172,701,310 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 218 | py | test2.py |
with open("file.txt", 'r') as fh:
data = fh.readline()
lis= data.split(' ')
my_dict={}
for key in lis:
if key in my_dict.keys():
my_dict[key] += 1
else:
my_dict[key] = 1
print(my_dict)
|
f55b286448f114f3823f099a576af7bec1780a8c | 1c4638edd89805b983f284bfe1d9dca816f78c0c | /puck/local.py | a30011afe71f777bf4949acefc816e3c65aee26d | [
"MIT"
] | permissive | EricQAQ/Puck | 7f86002b66a8f9b2d0d1fdd85a7748c259eb336c | ca1fc47e068a9ab70cfa1a5307fe6b9ed8f6d90d | refs/heads/master | 2023-01-12T06:35:50.651357 | 2016-05-14T16:17:34 | 2016-05-14T16:17:34 | 46,499,288 | 24 | 4 | MIT | 2022-12-26T19:46:39 | 2015-11-19T14:57:51 | Python | UTF-8 | Python | false | false | 2,544 | py | local.py | # -*- coding: utf-8 -*-
try:
from greenlet import getcurrent as get_current_greenlet
except ImportError:
get_current_greenlet = int
from thread import get_ident as get_current_thread
from threading import Lock
if get_current_greenlet is int: # Use thread
get_ident = get_current_thread
else: # Use gree... |
e864dad3f46fc9c6c472823bd06ce74fb5cb3f41 | b2043039f690cf2a6e7a3767b7e266dd004212ec | /backend/drone_ros_ws/src/drone_app/scripts/gazeboTracking.py | 2597d2ccd272274503c205dc67601293d899ed14 | [
"BSD-3-Clause"
] | permissive | Flytte/flytte | 0879e14ca927750907e41356b014afabd62178f7 | 36e2dc886c7437c3e3fff5a082296d5bc1f10bd7 | refs/heads/master | 2020-03-16T09:43:04.670742 | 2018-06-03T14:31:40 | 2018-06-03T14:31:40 | 132,621,313 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,635 | py | gazeboTracking.py | #!/usr/bin/env python
import rospy
import cv2
import numpy as np
from cv_bridge import CvBridge
from matplotlib import pyplot as plt
from sensor_msgs.msg import Image
from drone_app_msgs.msg import BBox, Drone, DroneArray
from rospy.numpy_msg import numpy_msg
# ---------------------------------------
# This is an impl... |
f3a63a22f8746d4a1f127bfe9e8c9d822109ab3c | 6acea1c5206052393beb5cba132f40e55b637c11 | /doc_curation_projects/puraaNa/raamaayana/dump/audiichya/iitk.py | 0c3afab1bcc8925d0d353bb42f16b28726cc9de5 | [
"MIT"
] | permissive | sanskrit-coders/doc_curation | a44afacf68d1711bcebd02c97b30a42b6d82bccc | db330393d3df052c008811f4b442421900e5fa84 | refs/heads/master | 2023-08-27T09:41:22.784001 | 2023-08-11T05:40:46 | 2023-08-11T05:40:46 | 157,027,340 | 8 | 4 | MIT | 2022-12-08T08:26:49 | 2018-11-10T22:32:26 | Python | UTF-8 | Python | false | false | 5,216 | py | iitk.py | import logging
import os
import textwrap
from urllib.request import urlopen
from bs4 import BeautifulSoup
from tqdm import tqdm
from doc_curation import book_data
from doc_curation.md import get_md_with_pandoc
from doc_curation.md.file import MdFile
from doc_curation.scraping.misc_sites import iitk
from doc_curation.... |
90bb70b0a97c7872c8581a176ebacc50df8e1f72 | 598d93732208a747f2bc1f8a31f55ca93529344e | /DiplomskiDemo/hello_world/util.py | f3f4b787eaddae1c5a7859b998764838dcf27c7e | [] | no_license | stepanov1997/Diplomski-primjeri | 785f8aeedbc03d1dee32d0c2b524d44c2cd453d3 | becfa1cc6c92906ef3d923222649b027a3c63825 | refs/heads/main | 2023-04-08T03:39:03.862735 | 2021-04-15T03:14:09 | 2021-04-15T03:14:09 | 354,177,915 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 170 | py | util.py | import datetime
def year_choices():
return [(r,r) for r in range(1984, datetime.date.today().year + 1)]
def current_year():
return datetime.date.today().year
|
d1b2420778e788d78be2a12a27c80f5fa1b15a0f | 447f25b70247a0b3fbe261647047b6c58bb152b7 | /decorators.py | 5aaa12f7719869c69fb62052ce1db6a31af4e3d4 | [] | no_license | ungaunga/ihris-documentation | b8d6b24afec96e1779099b5dd6af8b4de21852e1 | 89f697cc4690827c424f5bb0def1538cc80ac0b0 | refs/heads/master | 2022-12-25T21:20:02.055052 | 2019-09-19T12:14:04 | 2019-09-19T12:14:04 | 204,798,103 | 0 | 0 | null | 2022-12-08T06:06:12 | 2019-08-27T22:04:21 | Python | UTF-8 | Python | false | false | 3,736 | py | decorators.py | import functools
import re
from pprint import pprint
def heading(*, marker=''):
'''
Add a new line with the same number of heading markers as the characters in the title
Need to specify marker to one of the valid rst line markups
'''
def wrapper_heading(func):
@functools.wraps(func)
... |
29bee4ef11281380aa05d22ef54cb76502ecd685 | 5f8b40db6465a2d28a2369d8b99c8d0db9d06e90 | /previous/cell_state.py | 24f307404b8ebe120d495b6b521ed0cdf1a40b8f | [] | no_license | asherkobin/GameOfLife | 4d816ef8b7fcd46ddb3ef055ccfd172a53db9446 | 4fc9a9e568b58bb412b0586698c614211efc168a | refs/heads/master | 2022-11-24T02:10:30.081982 | 2020-07-13T21:35:32 | 2020-07-13T21:35:32 | 267,113,638 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | cell_state.py | from enum import Enum
class CellState(Enum):
EMPTY = 1
DEAD = 2
ALIVE = 3
WAS_ALIVE = 4
def __str__(self):
default_str = super(CellState, self).__str__()
if default_str == "CellState.EMPTY":
return "E"
elif default_str == "CellState.DEAD":
return "D"
elif default_str... |
b453006b4d4c5f17bb58110fe8197d7796ca0c6c | eeeda45b600384ace26d2e04c7938ea1ce73e86a | /研究/信息技术考试/win.py | 669c0b683bae88722bf0ab85449c420c264ac416 | [] | no_license | tqscjrty/StudyPython | f296052907ea06d578e05f8356fd7b90ee06673d | 02565d084602b34dacd1d7150cbb200b6a6a55a9 | refs/heads/master | 2022-12-11T10:46:30.630351 | 2020-09-09T07:48:23 | 2020-09-09T07:48:23 | 294,024,328 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,566 | py | win.py | # -*- coding: utf-8 -*-
__author__ = 'tqs'
from win32com.client import Dispatch
import win32com.client
import time
import os
import re
import win32api
'''
windows操作部分说明:
考试波及知识点:
1.删除文件及文件夹
2.复制文件及文件夹
3.移动文件及文件夹
4.文件及文件夹改名
5.文件属性
考试样例:
1、在“蕨类植物”文件夹中,新建一个子文件夹“薄囊蕨类”。
2、将文件“淡水藻.ddd”移动到“藻类植物”文件夹中。
3、设置“螺旋藻.aaa”文件属性为“只读”... |
170d0560c40f3f642f319f6113b68ab8a6bea9ef | 3dd997a7bc929df0ed585a0ebd8338fe72f29680 | /353_Relaxationsverhalten_eines_rc_kreis/python/b.py | c8e37caeba5f6beea262875b4e7d3cf03c23afed | [] | no_license | SamGTex/Physik_Praktikum_Samuel_Max | a0f8327d90a1153e88c0e87a43d14053f9cc621a | 9da4822ef408590f2a6136cf7c9be854fdc4a3b2 | refs/heads/master | 2022-08-24T01:29:56.970605 | 2022-08-13T10:43:57 | 2022-08-13T10:43:57 | 213,144,856 | 2 | 2 | null | 2021-08-19T13:20:00 | 2019-10-06T10:00:10 | TeX | UTF-8 | Python | false | false | 1,268 | py | b.py | import csv
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import curve_fit
#funktion
def func(w,rc):
return 1/(np.sqrt(1+w**2*rc**2))
#daten einlesen
with open('data/phase.csv' ) as csvfile:
reader=csv.reader(csvfile, delimiter=',')
header_row=next(reader)
f, U, a,... |
c9cf65eeec49eba004312491cdd2321200fa6a61 | 262d13266eedfc708c04592d1987c7a5dfce301d | /Decision Tree.py | 033275ba446ae486c01ec8a893785faae6b9c8b9 | [] | no_license | FatemeZamanian/MachineLearning-W3schools | c40fc6b57f0c674ceb99a54057c401deb3119677 | 43550a8c4351869e17ebcdcfd1aec3f88d508968 | refs/heads/master | 2023-06-27T20:58:23.375169 | 2021-07-31T19:00:54 | 2021-07-31T19:00:54 | 391,441,015 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 754 | py | Decision Tree.py | import cv2
import pandas
from sklearn import tree
import pydotplus
from sklearn.tree import DecisionTreeClassifier
import matplotlib.pyplot as plt
import matplotlib.image as pltimg
df = pandas.read_csv("show.csv")
d = {'UK': 0, 'USA': 1, 'N': 2}
df['Nationality'] = df['Nationality'].map(d)
d = {'YES': 1, 'NO': 0}
df['... |
498f85bf5ebe8a8d5bc96fc90c8b5bf01631811d | 9d6096e19ed678f84665689718cb0099da4943a0 | /case/infrasim/virtual_node/T33249_idic_KCSLanPrint.py | e0dabfc4993bd4e6697eff2c9fc67368d9194e66 | [] | no_license | fub2/test | 9fa4539a345059cf06f7d8ac60d3e98e0a5fc7d8 | b5a486335e20c5dff2cfdb0d50b898d7255c2f1f | refs/heads/master | 2021-01-23T09:45:51.340729 | 2017-09-11T10:34:17 | 2017-09-11T10:34:17 | 102,597,794 | 0 | 0 | null | 2017-09-06T10:56:35 | 2017-09-06T10:56:35 | null | UTF-8 | Python | false | false | 4,377 | py | T33249_idic_KCSLanPrint.py | '''
*********************************************************
Copyright @ 2015 EMC Corporation All Rights Reserved
*********************************************************
'''
from case.CBaseCase import *
import re
class T33249_idic_KCSLanPrint(CBaseCase):
def __init__(self):
CBaseCase.__init__(self, sel... |
017aae4996cab02ff742e731fe27435e3f693490 | 48358c8bbeb802af3dc4abfa29ee06a0384a12c5 | /swap_kalam.py | db73d98c034d7d545277496a6e8d16a435f16ef5 | [] | no_license | Prat2404/Learn-Fibonacci | 2c34e3ddd9d767def75beea65c03954ecb7a14a1 | 72f79a4f9eecf138a12796e4e822871f7fff065c | refs/heads/main | 2023-01-12T22:50:58.918153 | 2020-10-25T13:15:01 | 2020-10-25T13:15:01 | 307,100,749 | 1 | 0 | null | 2020-10-25T13:05:41 | 2020-10-25T13:05:40 | null | UTF-8 | Python | false | false | 113 | py | swap_kalam.py | इनपुट(a)
इनपुट(b)
temp=a;
a=b
b=temp
दिखाए("a = "+a)
दिखाए("b = "+b)
}
|
2e6d2f5235c60487e12cc3ec2aa77fa614460fca | cfb261e106b40dd5d40044c19db7bc0d27c97142 | /AMT/run.py | 9bbeefda56a1593f7faf71071a2bc7fde4d59e28 | [] | no_license | connorhargus/automatic-music-transcription | 3264b84ba5068141351d97dcc840ecd761bb0815 | 173e631b01ae73b9b8139541eeedee711846e658 | refs/heads/master | 2021-10-20T19:15:26.146549 | 2019-03-01T09:13:40 | 2019-03-01T09:13:40 | 114,839,346 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,203 | py | run.py | from os.path import isfile, join
from split_data import split_data
from generate_features import generate_features
from generate_outputs import generate_outputs
from tdnn import tdnn_train
from tdnn import tdnn_predict
from hmm import hmm_train
from hmm import hmm_predict
"""
Main script recipe to process data, trai... |
7af93fb59d7ea58b7ed4516987fc90ce3e63cf92 | 2266a03390ca9fc2e17defda0e6b1383f01bd9a1 | /03-search/agent.py | cc6422aa301e9436035066c4afb35a14815fcee1 | [] | no_license | ozan-san/AI-Homeworks | ee09bc57186afae783059bd201d9f7154260aa1c | 119629c1d8980e35ae7ac00a4e37c78b3bdd45e3 | refs/heads/master | 2022-10-12T03:04:41.147972 | 2020-06-01T11:21:02 | 2020-06-01T11:21:02 | 266,415,696 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,367 | py | agent.py | #!/usr/bin/python3
'''
Assignment 1: Search (A* Algorithm)
@author: Ozan Şan, Zdeněk Rozsypálek, and the KUI-2019 team
@contact: sanozan@fel.cvut.cz
'''
import time
import kuimaze
import os
from heuristics import heur
class Agent(kuimaze.BaseAgent):
'''
Simple example of agent class that inherits kuimaze.B... |
08e8bb91ebe6cd2c862808d31a2869c90e239b70 | 9f348ebbfb5a0de866b24a04db518fcd4e47daa3 | /driver.py | c93ef96bf16699e8fb47db7f91e08c98875e0b42 | [
"MIT"
] | permissive | anishLearnsToCode/porter-stemmer | 30d1a7f294340fe7ffc5601db68861793f8dc494 | 617c7f541485a444428cd302a943b66e9570a604 | refs/heads/master | 2022-12-18T16:46:04.553302 | 2020-09-19T10:57:40 | 2020-09-19T10:57:40 | 287,752,330 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | driver.py | from porter_stemmer import PorterStemmer
stemmer = PorterStemmer()
resume = open('assets/resume.txt', 'r').read()
print(stemmer.stem_document(resume))
|
808426bbb877f21737e8c9b9a394d308ab7f73a6 | 51b022ea10d8b903c52f9ac6aa96ea4c3b2f6f79 | /sql_app/models.py | e7210ec97f5d161c21d7bb8c969c76731418d16b | [] | no_license | sugy17/p5-hackthon | 65db2f3eb48d71edfdedd71777812ab2cf241cbb | 6e42470dfc276cb4bea930ef62062bf178f9748a | refs/heads/master | 2022-11-22T10:51:55.958432 | 2020-07-24T22:00:03 | 2020-07-24T22:00:03 | 282,314,447 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,289 | py | models.py | from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
from sqlalchemy.orm import relationship
from .database import Base
class Student(Base):
__tablename__ = "student"
sid = Column(Integer, primary_key=True, index=True)
name = Column(String)
passwd = Column(String)
phone= Column(St... |
dc1016c7103cd5a4edae9e7881243a1af6ca9502 | 14f1a27ce75255777f732daaab1799a3885b9510 | /analysis.py | 34b1019f59e33cb4ea49ec2942e3ee762729f4f5 | [] | no_license | ZeloZhang/GlobalFit-cascade | 7cc3e80018f995911ca29cde222930c4d760c615 | 0ae34ddfbade0ebf6b2e0d79d61b54aacde9988c | refs/heads/main | 2023-03-02T04:30:18.464990 | 2021-02-02T04:01:44 | 2021-02-02T04:01:44 | 332,619,120 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 269 | py | analysis.py | #!/usr/bin/env python
from src.analysis import analysis
import numpy
this = analysis()
this.create()
print "... testing exposed likelihood calculated in C++"
seed = numpy.array([1.6, 1.0, 0.0, 2.2, 2.67])
pars = seed
print "lnprob (seed):", this.get_lnprob(pars)
|
84a09bab55a2b0f50532bfbdee040ad662ecef29 | 71fd9d1e857d12a765bdb011dee283b5358e4179 | /test/database_test.py | 3653253a9303ca3d72b81042db58e57ecfcba63c | [] | no_license | wenbinhuang9/BenDB | 0250b7eb761ab718248bafb42772f4b1c7df819a | 5dce62736cb97889329b28a35450d92e169f7d09 | refs/heads/master | 2020-12-06T07:53:05.096269 | 2020-01-09T23:39:13 | 2020-01-09T23:39:13 | 232,398,526 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 775 | py | database_test.py | import unittest
from core.database import Database
from core.field import Field
class MyTestCase(unittest.TestCase):
def test_creating_table(self):
db = Database("db")
age = Field("age")
name = Field("name")
field_name_map = {"age": age,
"name": name
... |
3f6b04407dab34fe84c91bdd8e32aee91a6cd914 | 9240e14461b5e62303faeb507b6bb1219b74a513 | /Y5 Practical 2/q07_miles_to_kilometres.py | 8f87d0bd00c5bdf85b1a06e45b05e1da5c26bdd6 | [] | no_license | 4wqre/cp2019 | 94aef48fe565e2a5040e95ed02ea937d8d46dc7d | 92dddaccd765c723fd6ca7f2fa1719ed008b89bc | refs/heads/master | 2021-06-28T13:26:37.299745 | 2020-10-08T01:53:32 | 2020-10-08T01:53:32 | 171,573,465 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | q07_miles_to_kilometres.py | def milestokm(miles):
km = miles*1.609
return "{0:.3f}".format(km)
print("Miles", "Kilometres", "Kilometres", "Miles")
for i in range(1,11):
print(str(i), " " , milestokm(i), " ", str(i*5+15)," ", "{0:.3f}".format((i*5+15)/1.609))
|
7763baef6401e00e6bb873117906e3573e896adb | e066162472374749cf0cb77ac732479521b2c2d3 | /headers_pool.py | ef5efaf7b8a55cb57d08121b1850819cd70f6fc0 | [] | no_license | OD-Ice/ticket | c6ce22d4e78f8ca0bb5e84dddcbb32230f891dae | c6f503a343c427814ddfb4baebd11428409d23cf | refs/heads/master | 2022-12-27T18:15:55.194004 | 2020-10-09T08:13:41 | 2020-10-09T08:13:41 | 273,231,570 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,349 | py | headers_pool.py | class User_Agent:
def __init__(self):
self.user_agents = [
'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Acoo Browser 1.98.744; .NET CLR 3.5.30729)',
'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Acoo Browser 1.98.744; .NET CLR 3.5.30729)',
'Mozi... |
06d89953d5153b82f58552ab4ff20760418dbc3f | 8c4d4d131b4aad04caf4c492a6e51ca19d75ad6a | /jblog/migrations/0002_auto_20160729_1254.py | a8ba23e9bd37cbc50cfafcbfd578c3f8cc2d2be4 | [] | no_license | jereantequera/BlogDjango | 29753f368826d91a434e334c19d4e42fa263d2cf | 695687875bd172229e163128402ccef4937d2d70 | refs/heads/master | 2020-12-05T20:27:06.268919 | 2016-08-25T20:54:26 | 2016-08-25T20:54:26 | 66,592,418 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | 0002_auto_20160729_1254.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-07-29 12:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('jblog', '0001_initial'),
]
operations = [
migrations.AlterField(
... |
ab6a4a835403b3d3fb7e59c7eb828fbe900cf078 | d0b1bdc858137940d73d5865865a8dab93a63297 | /user-scripts/adrid/victoria.py | 8a79975ab8eccc24e714c5db6619eb4e39944df1 | [
"Apache-2.0"
] | permissive | NaturalHistoryMuseum/raster-project | 8a9902d475dd97cbf0d4eb789f34481b9c3691bb | 319a0f633de8cf2317eba5d82396036f01ce5262 | refs/heads/master | 2023-09-04T01:44:34.533178 | 2020-02-14T14:15:25 | 2020-02-14T14:15:25 | 106,575,143 | 1 | 0 | null | 2017-10-11T15:49:18 | 2017-10-11T15:49:18 | null | UTF-8 | Python | false | false | 3,119 | py | victoria.py | import time
import fiona
import multiprocessing
from rasterio.plot import show
import math
import os
import click
#import matlibplot.pyplot as plt
import numpy as np
import numpy.ma as ma
import rasterio
from rasterio.plot import show, show_hist
import pandas
from projections.rasterset import RasterSet, Raster
from pr... |
af87a165533a87a241f22d19507fd04f03ae3401 | 9822937d52c10a1a274569c9772c5da7b8c5b411 | /tests/test_utilityclasses.py | 8bfc36b99c28101c34f122fe5064ec4a86d956d7 | [] | no_license | aggerdom/pdf-processing-utils | e8cdae487a22e4c41d5e55d1634aaa5787005fd3 | 7ea701a2747506d1e1d4bba421cd0ac2bb964846 | refs/heads/master | 2021-01-01T05:43:43.398273 | 2016-12-29T21:10:28 | 2016-12-29T21:10:28 | 58,971,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | test_utilityclasses.py | from utilityclasses import GhostScript
import os
from unipath import Path
import unittest
class TestGhostScript(unittest.TestCase):
def test_pdf_to_png(self):
testdir = Path(r"C:\tmp\pdfprocessing\test")
testdir.chdir()
input_file = "testpdf.pdf"
output_file = Path(r"C:\tmp\pdfproc... |
78c11f0687089fc0a08d82f76c2477a703721789 | 215bf6024e7d7feab3fc3a319247fb34c83f9929 | /neighbourhood_experiments/user_vector_activity_time.py | bc57ed623916ce31a66f8e397918fa060ec0a403 | [] | no_license | sahil505/social-network-embeddings | 2a7386d5ddb5461d5768c4f3ae53099efe408098 | 72ea70132b642525d53710330f566c0afde1d1da | refs/heads/master | 2021-04-29T20:58:44.923421 | 2018-10-15T12:42:04 | 2018-10-15T12:42:04 | 121,606,925 | 9 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,202 | py | user_vector_activity_time.py | #split user set into training and test for activity time prediction using sklearn
import cPickle as pickle
import time, datetime
from dateutil import tz
from math import sqrt, log
import numpy
# from scipy.spatial import cKDTree as KDTree
from sklearn.neighbors import NearestNeighbors
import sys
from sklearn... |
a63569cc477730a4f1a672d17e5b02e099ffa219 | 853e497b40b2ac8db6274af7fee7c9ff6b4091bd | /map_info.py | 51fcc969ab59355055bf1ef15e6f4a4fc0abc3d4 | [] | no_license | CodingDonky/d_a_d | a25bd51248f574318446d7be686251c07b35da75 | d5c065e97310fd284c5df4e0c589ab85d7b0473f | refs/heads/master | 2020-04-12T01:52:37.832380 | 2018-12-18T05:29:33 | 2018-12-18T05:29:33 | 162,230,780 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 866 | py | map_info.py | class Tiles:
Size = 32
Blocked = []
Blocked_Types = ["3"]
@staticmethod
def Blocked_At(pos):
if list(pos) in Tiles.Blocked:
return True
else:
return False
def Load_Texture(file, Size):
bitmap = pygame.image.load(file)
bitmap = pygame.tra... |
bee745bd3284e34c42cb85f1a833d1c33c30de52 | b6bc8c2f7beefc838caae8c3a0f0f6daedd6753f | /autoencoders/mnist_keras_stacked_convolutional_autoencoder.py | 5bba09fda75ae081fc2b368fb5260cacb7c19f99 | [
"MIT"
] | permissive | Pyrsos/tensorflow_tutorials | 83a754c355f8b170616dc8de17f225c9f9b9c202 | 4da4a11fd5b9567cca5d2c93dfd8a6267b975c51 | refs/heads/master | 2020-05-02T17:11:43.326867 | 2019-05-25T20:01:46 | 2019-05-25T20:01:46 | 178,091,389 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,069 | py | mnist_keras_stacked_convolutional_autoencoder.py | '''
Example script for constructing a 3-layer deep denoising convolutional autoencoder
using Keras.
'''
from absl import flags
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from pyrsostf.mnist import MNIST
flags.DEFINE_integer("batch_size", 100, he... |
e6ce4679f8ed1c45db42fb82265b9ad441e4410b | f2c97c5a4d5039c8ad7840cfe1b0622ccadfd5e9 | /Programming Fundamentals - Python/05Arrays - Exercises/05CompareCharArrays.py | 2cb5eca0ddfa4dfb0d3d9c84b0be213aac0f47fc | [] | no_license | mavrovski/PythonPrograming | 09ead1ae0fbedfc2606824d27f7a1bde0b63b73b | 4f1a703fbd0a2ad6b756ddfde8f936bb072c1e1e | refs/heads/master | 2021-08-19T14:46:56.793246 | 2017-11-26T18:16:06 | 2017-11-26T18:16:06 | 109,840,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | 05CompareCharArrays.py | array_one = input().split(' ')
array_two = input().split(' ')
array_one_length = len(array_one)
array_two_length = len(array_two)
short_array = min(array_one_length,array_two_length)
for i in range (0,short_array):
if array_one[i] != array_two[i]:
if array_one[i]<array_two[i]:
print(''.join(a... |
ad2c0a6f3e2f43505e4d6c10ad7259a8e27ee434 | 6dcd1104fb491f0d384d8ca21f25f87e5810efda | /Project7/ops.py | 1e01bc2e1da689062d106d3134c25edb923d3a7a | [] | no_license | StandartKai/DeepLearningLab | 75279e444b2dbcf9b756a24a569c59fbf3187a56 | 49792b9fcbc5ec9030c5f1b261f1672969d327e2 | refs/heads/master | 2021-05-07T09:27:08.288446 | 2018-02-13T12:04:58 | 2018-02-13T12:04:58 | 109,609,591 | 0 | 1 | null | 2018-01-18T12:45:33 | 2017-11-05T19:34:02 | Jupyter Notebook | UTF-8 | Python | false | false | 7,546 | py | ops.py | import tensorflow as tf
import math
import numpy as np
import h5py
from tensorflow.examples.tutorials.mnist import input_data
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from os import getcwd
def lrelu(x, leak=0.2, name="lrelu"):
return tf.maximum(x, leak*x)
def conv2d(input_, outpu... |
8c632fa773914cc1d6cf74d4e545394aaf1e6226 | a2e4b27ffce5e8d70c43f08197cccfe0b8dffd7c | /hr-new_branch/project_enhancement/models/project.py | 4a68ca228c44020653de1009976836cf56aadbe4 | [] | no_license | mfhm95/royalLine01052019 | c75d1a315395c2812de13da0e0f09a0e4b1f784b | f392c7f17c9a348b00fc9db2e460a8ba010b7748 | refs/heads/master | 2022-01-23T16:50:14.827847 | 2019-04-30T21:42:24 | 2019-04-30T21:42:24 | 216,782,012 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 787 | py | project.py | # -*- coding: utf-8 -*-
from openerp import models, fields, api
class Project(models.Model):
_inherit = 'project.project'
@api.model
def get_stages(self):
return self.env['project.task.type'].search([]).ids
stage_ids = fields.Many2many('project.task.type', 'project_task_type_rel', 'pro... |
cf0a2dbe3c2d14e7aa591f0139afb5dc75838c2f | e54cc943010fece4af06426bdfdb3f86343f39df | /RaspberryPi/+L298N驱动板/cart_automove_PID.py | 5ed28c80e492cb19ca113f1fc8b5e4cb0781bcd7 | [
"MIT"
] | permissive | yzy1996/RaspberryPi-Arduino | 635faa6944b2ad4f5ebe4f395dc4acd5f149a053 | 92b0a984413060cff12347a55665e1233c5b9a72 | refs/heads/master | 2020-03-31T15:30:52.128633 | 2019-11-24T06:36:47 | 2019-11-24T06:36:47 | 152,340,581 | 14 | 7 | MIT | 2018-11-08T23:33:00 | 2018-10-10T00:47:12 | C++ | UTF-8 | Python | false | false | 3,481 | py | cart_automove_PID.py | # coding:utf-8
# 加入摄像头模块,让小车实现自动循迹行驶
# 思路为:摄像头读取图像,进行二值化,将白色的赛道凸显出来
# 选择下方的一行像素,黑色为0,白色为255
# 找到白色值的中点
# 目标中点与标准中点(320)进行比较得出偏移量
# 根据偏移量,采用PID控制器来控制小车左右轮的转速
import RPi.GPIO as gpio
import time
import cv2
import numpy as np
def sign(x):
if x>0:
return 1.0
else:
return -1.0
# 定义引脚
pin1 = 12
pi... |
7eb9400448323c6489f051a309a1f015c1940d7a | b483bdb5332749abc50c87a81241d13621cd419a | /datastructure/list/maximum_subarrary.py | 1938e7865def0e2cf328609f955ef6f205dfd788 | [] | no_license | YuanZheCSYZ/algorithm | 89ac22f35768f6e97cf2e47044a1b212f3852996 | 843db7190a95ebe310f5e867c02d28d43ca99248 | refs/heads/master | 2021-12-24T16:09:03.759085 | 2021-12-17T18:08:51 | 2021-12-17T18:08:51 | 69,831,818 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,303 | py | maximum_subarrary.py | # 53 https://leetcode.com/problems/maximum-subarray/submissions/
class Solution:
"""
Runtime: 672 ms, faster than 86.39% of Python3 online submissions for Maximum Subarray.
Memory Usage: 28.8 MB, less than 9.80% of Python3 online submissions for Maximum Subarray.
"""
def maxSubArray(self, nums: Lis... |
dec2e23a56826206447cd3e44044113a6e5a2a0a | d0533b0574494b13606a557620f38f5a2c74ce16 | /venv/lib/python3.7/site-packages/tigeropen/trade/domain/contract.py | ec76dfb6c0b846f17fbd40759225d1408f7a5dbb | [
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft"
] | permissive | CatTiger/vnpy | af889666464ab661fb30fdb0e8f71f94ba2d1e41 | 7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b | refs/heads/master | 2020-09-26T00:37:54.123877 | 2020-07-13T10:15:46 | 2020-07-13T10:15:46 | 226,124,078 | 0 | 0 | MIT | 2020-04-21T03:02:20 | 2019-12-05T14:44:55 | C++ | UTF-8 | Python | false | false | 2,068 | py | contract.py | # -*- coding: utf-8 -*-
"""
Created on 2018/9/20
@author: gaoan
"""
from tigeropen.common.consts import SecurityType
class Contract(object):
def __init__(self, symbol, currency, contract_id=None, sec_type=None, exchange=None, origin_symbol=None,
local_symbol=None, expiry=None, strike=None, put_c... |
e2b055c3133fb9e9b1af58d8761e05b317cfce49 | ec3bdc039ccb5274d049fb2efeae4c4b89bbe5cc | /2018-07-28 - pyohio - annotation abuse/code/demo_notify.py | 727e57f7b98f5fd9577ae33415a0936b9fc2190e | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | zmitchell/talks | d37568b6a31d70264625a0add555518d8d1a4d38 | 88f36b85199a4c281b007c79ccb53f329bbe4e49 | refs/heads/master | 2022-03-08T13:37:46.053239 | 2022-03-03T01:37:30 | 2022-03-03T01:37:30 | 212,619,636 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 241 | py | demo_notify.py | from annotation_abuse.notify import notify
@notify
class MyClass:
def __init__(self, x):
self.x: "this one" = x
self.y: int = 1
if __name__ == "__main__":
foo = MyClass(3)
for i in range(5):
foo.x = i
|
0fed92b55d9e84bf08d0352dfb8679519bc3ea0f | 4af090efabd08ef73c411a00ce4972a1c6f30a22 | /python_practice/python0515/003.py | 7c9c74c19e5d5c04fc265a1e1dee758a686a99e5 | [] | no_license | predatory123/byhytest | e52bca664f9461c9309aaa9bf779c02368ed937c | 578206c9ec9253d0d9325e72cdc13dde6eeb2fc1 | refs/heads/master | 2023-04-26T13:33:14.462408 | 2021-05-20T13:33:37 | 2021-05-20T14:26:22 | 369,213,148 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 730 | py | 003.py |
#2.在函数中修改列表
#(1).不使用函数
magsci_list = ['tom','jake','taylor']
new_magsic = []
while magsci_list:
magscian = magsci_list.pop()
# print('New magsic: '+ magscian)
new_magsic.append(str(magscian) + ' the Great')
for new_magsician in new_magsic:
print('New magician is ' +new_magsician)
'''(2) .使用函数
'''
def... |
ffbf53721547b6b3f708a5eb794fc9801f3e9b4a | 59470788cbab35eb9638c43a1d05ec281eac820d | /exercises.py | ee830104347a3d847fb8ebcb8363ab36c0e83c61 | [] | no_license | declanmunroe/teach_python | 0a8bdc44f79e62b9d4c479a5a952c11aa53a7768 | 50cd588bb21cf2edc30835b79c35aa8cca8c689c | refs/heads/master | 2021-07-09T03:53:41.872331 | 2017-10-09T15:49:11 | 2017-10-09T15:49:11 | 106,255,876 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | exercises.py | def addTwoNumbers(x, y):
return x + y
print (addTwoNumbers(5,3))
print (addTwoNumbers("5","3"))
def bigSmall(num):
if num > 10:
return "Big"
else:
return "Small"
print (bigSmall(11))
def are_same(x,y):
return x == y
print (are_same(5,5))
def size(x,y):
if x == y:
... |
8775852caba729d5776a343dc9e98614e5b9db8f | 0373be3f3130e9ec9d15774aa4d412b2dd53ba97 | /youtube/YoutubeVideos.py | 92936ee4ca0aa869ccbbc5d3466d275a1a2ee361 | [
"MIT"
] | permissive | seiferma/Docker_YoutubeDLService | db68ef0bd369f3833e281fc7db4f57caa0e8edc8 | 818f7d596434f667373872a3688fe17b15ccd4a5 | refs/heads/main | 2021-09-08T23:29:30.813349 | 2021-09-01T18:28:12 | 2021-09-01T18:28:12 | 229,991,583 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 379 | py | YoutubeVideos.py | from __future__ import unicode_literals
import cherrypy
from .YoutubeVideo import YoutubeVideo
class YoutubeVideos(object):
def __init__(self):
self.youtube_video = YoutubeVideo()
def _cp_dispatch(self, vpath):
if len(vpath) > 0:
cherrypy.request.params['videoid'] = vpath.pop(0)
... |
acab1ecf1b2ac4cbde1f7dfcc7025556a5a0168a | 17ccd2bb4e9520c646f604f9db2a1274abe35b33 | /simplerunlog/apps/runlog/forms.py | c88a96aaf9e406fc5994e52798e6f0bbcc5ab452 | [] | no_license | andrewaustin/simplerunlog | 026b3dcdf5fa4039e3c50f311d7025bd48613625 | 138e15888080f59c12e74de481a21d750f25677d | refs/heads/master | 2020-05-01T13:56:50.162868 | 2012-10-05T18:15:57 | 2012-10-05T18:15:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 467 | py | forms.py | from django.forms import ModelForm, ChoiceField, RadioSelect
from apps.runlog.models import Run, UserProfile
class AddRunForm(ModelForm):
class Meta:
model = Run
exclude = ('user',)
# validation is inside the model
class UserProfileForm(ModelForm):
public = ChoiceField(choices=((False,
... |
45b113a337ea77757ce4de4931326c2990d86ca5 | 75514b4ff89031b483ba528b3fd7d56ffddd9928 | /toy_example.py | d6b00a76d76b9bf341a0e5c733d975320c23b6e5 | [] | no_license | tkoch96/internet_econ_midterm_paper | f5ba13fe7d7f32b1c779912958dc9b19805ff123 | 021323b9ec47e08c1e8573eeb598f5b6ab5d50c6 | refs/heads/master | 2021-03-16T15:37:48.126473 | 2020-03-12T19:59:00 | 2020-03-12T19:59:00 | 246,920,570 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,597 | py | toy_example.py | from ortools.linear_solver import pywraplp
import numpy as np
def lp_three(constraints,alpha,d):
solver = pywraplp.Solver('LinearProgrammingExample',
pywraplp.Solver.GLOP_LINEAR_PROGRAMMING)
# constraints are [a,b,c] corresponding to x,y,z peak link demands
x = sol... |
b966fceffbdc6598d0d54ff61dbf61c18567f4a1 | 3358e313cda286e6702bcafd5db83a0327e85266 | /day15/15.py | ac204daa5c12b33c96075a243f6c24c876b674bf | [
"MIT"
] | permissive | thorstel/Advent-of-Code-2015 | 6fe6350111489139575957a7f56dd10dc987a611 | d6e70db888a2a3c7b87e1cc88af7a8fe08596fd5 | refs/heads/master | 2023-02-10T03:56:34.596416 | 2021-01-01T14:47:16 | 2021-01-01T14:47:16 | 323,436,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,781 | py | 15.py | import itertools
import re
import sys
def solve(data):
data = data.splitlines()
assert len(data) == 4
prop = []
for line in data:
p = line[line.find(':') + 2:]
prop.append(list(map(lambda s: int(s.split()[1]), p.split(', '))))
total_score1 = 0
total_score2 = 0
for i in rang... |
9bc76b0a363fca222eae31ec7a69eab3a686c701 | e5f4696ec403913acbe201ce9e0e8ab9d036f812 | /leetcode/middle/arrAndStr/increaseTuple.py | 13e81f8b19e09dacca0dd3aa3bf312493474db5f | [] | no_license | javacode123/oj | 393a4021666527d54872f3a056d4f50459a20b9d | c9bb551a1681af595dfc81f285d4c15e4d1ffb38 | refs/heads/master | 2020-06-20T16:57:00.941505 | 2019-12-11T08:01:11 | 2019-12-11T08:01:11 | 197,185,346 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 529 | py | increaseTuple.py | # -*- coding: utf-8 -*-
# @Time : 2019-08-20 00:20
# @Author : Shark
# @mail : zhang_jia_luo@foxmail.com
# @File : increaseTuple.py
# @Software: PyCharm
class Solution(object):
def increasingTriplet(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
a, b = fl... |