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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
db55a603615c7d896569ada84f3110dd6c0ce45f | a228617c79e5cef3c17eff0face47ba95d5ec4b6 | /freebsd.py | 3c9abc1c81820b7597bdc4b1ae090bc485617b8b | [] | no_license | pombredanne/pkg-5 | 7282d16859977cab521c131ef7fd83d00fef8870 | 1e9a5a6f0dab7814f4286bb6bc9aa3a637d035a9 | refs/heads/master | 2021-03-13T03:08:21.714713 | 2016-04-06T11:23:01 | 2016-04-06T11:23:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | freebsd.py | import shell
def executeUpgrade():
shell.executeCommand('pkg upgrade')
def executeInstall(pkg_name):
shell.executeCommand('pkg install ' + pkg_name)
def executeRemove(pkg_name):
shell.executeCommand('pkg remove ' + pkg_name)
shell.executeCommand('pkg autoremove')
def executeFindByName(name):
... |
3078a0c7e2c711da88846ca3401c7924b1790dbc | 9984d621a2dd5d7e8c79eaecf013160b32d40ee5 | /src/convirt/core/utils/phelper.py | d037a303ea162d7cb99c6f23cdba5b4f32c8a338 | [] | no_license | convirt/Ubuntu1204 | 830d2615fc7643fe52ca470541a80e10e17e74b5 | 785386022c744c6ef9daed5c7950043f9fe0fb73 | refs/heads/master | 2021-01-23T07:25:53.203040 | 2013-10-03T03:50:35 | 2013-10-03T03:50:35 | 12,891,735 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,640 | py | phelper.py | #!/usr/bin/env python
#
# ConVirt - Copyright (c) 2008 Convirture Corp.
# ======
#
# ConVirt is a Virtualization management tool with a graphical user
# interface that allows for performing the standard set of VM operations
# (start, stop, pause, kill, shutdown, reboot, snapshot, etc...). It
# also attempts to s... |
64fd597918fe8133d53d1df741512cd2e49a111d | b0eeb1529ae18d7a781fb93b0b13f9a3ca30eb93 | /trs/models.py | 63bba761d37125f772b06c7e4ee5628a359b43a6 | [] | no_license | shiryov/trs_web | 8f75f3296dbdde98fc4c3306459ecbae99970ab4 | e66a4fe305f55de9bc13024ee0e66f5da185ed05 | refs/heads/master | 2016-09-05T10:40:09.413149 | 2012-03-10T10:52:29 | 2012-03-10T10:52:29 | 3,392,952 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,035 | py | models.py | # -*- coding: utf8 -*-
from django.db import models
import custom_fields
import datetime
#import mptt
# Create your models here.
class Message(models.Model):
user = models.ForeignKey('User')
time = models.DateTimeField(auto_now=True,auto_now_add=True)
text = models.TextField()
#true если это ответ подд... |
05aec07b94f3363e07d8740b102262d817e08e71 | e97e727972149063b3a1e56b38961d0f2f30ed95 | /knetik_cloud/apis/gamification_leaderboards_api.py | 5196dc0b6402b84a73a618c16462178c8e053911 | [] | no_license | knetikmedia/knetikcloud-python-client | f3a485f21c6f3e733a864194c9acf048943dece7 | 834a24415385c906732437970db105e1bc71bde4 | refs/heads/master | 2021-01-12T10:23:35.307479 | 2018-03-14T16:04:24 | 2018-03-14T16:04:24 | 76,418,830 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,798 | py | gamification_leaderboards_api.py | # coding: utf-8
"""
Knetik Platform API Documentation latest
This is the spec for the Knetik API. Use this in conjunction with the documentation found at https://knetikcloud.com.
OpenAPI spec version: latest
Contact: support@knetik.com
Generated by: https://github.com/swagger-api/swagger-codeg... |
dbb007af79b2da2b5474281759c2bcce2a836fb5 | be8f520dd8f28a58a4b8d8efa8a1e570821d33c3 | /main.py | c7849a24ed8df7ef2c05819f28edbd58ad6fd001 | [] | no_license | lf-hernandez/auto-label-printer | d35bcbcebfb3f6f148bb34e3abb6873b78dad6e0 | 1a89d8aebffa2d22333af814e3b90f2e161ad7d2 | refs/heads/master | 2022-11-23T01:35:29.567383 | 2020-07-31T11:31:22 | 2020-07-31T11:31:22 | 284,020,132 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 684 | py | main.py | from requests import get
from bs4 import BeautifulSoup, SoupStrainer
import httplib2
import re
from win32printing import Printer
def getLinks(url):
links = []
document = BeautifulSoup(response, "html.parser")
for element in document.findAll('a', href=re.compile(".pdf$")):
links.append(element.get(... |
12f0eeeb81fe611d88e33fd2e8df407e289fb582 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_27032.py | 3d0b0ccccc8f25c8662da9d58be1e049277fe4d0 | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 57 | py | python_27032.py | # Error using ncdump - NetCDF4 Python
ncdump -h filename
|
bbb3d27ce8f4c1943ecc7ab542346c9f41cbd30e | 5e1f5f2090013041b13d1e280f747aa9f914caa4 | /scripts/sdk/gn/test_project/tests/e2e/testing.py | 4c5527deaabc54a84749a2e55a343479d823d3c7 | [
"BSD-2-Clause"
] | permissive | mvanotti/fuchsia-mirror | 477b7d51ae6818e456d5803eea68df35d0d0af88 | 7fb60ae374573299dcb1cc73f950b4f5f981f95c | refs/heads/main | 2022-11-29T08:52:01.817638 | 2021-10-06T05:37:42 | 2021-10-06T05:37:42 | 224,297,435 | 0 | 1 | BSD-2-Clause | 2022-11-21T01:19:37 | 2019-11-26T22:28:11 | C++ | UTF-8 | Python | false | false | 1,344 | py | testing.py | # Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module implements helpers for GN SDK e2e tests.
"""
# Note, this is run on bots, which only support python2.7.
# Be sure to only use python2.7 feature... |
ba483c7eaf2f2ced7f70a14b53c781f190585024 | 64e2c71f1edcd86ba5771592c1ff3ea5e90c0b9b | /py-api/main.py | 945ec5574b408318ddf0d1ab25fd1cd46d38deae | [] | no_license | adisaljusi/astar-py | eb4a12299aa28bf73630ca57d6824423b0d77c45 | 3cfa22919e8e791efd65dea017d33223795786d2 | refs/heads/master | 2023-04-20T22:26:59.384493 | 2021-01-05T19:49:13 | 2021-01-05T19:49:13 | 326,907,431 | 0 | 0 | null | 2021-01-05T16:50:30 | 2021-01-05T06:27:01 | Python | UTF-8 | Python | false | false | 607 | py | main.py | from AStar import astar
def main():
grid = [[0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 1, 0, 0, 0, 0, 0],
[0, 0, 1, 0, 1, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 1, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0,... |
b0fad3847519bb18365a8cd4226d06e9d96a8308 | 9c5a63fd4439eef3cb29c95a9c4f02e232408abb | /hello/hello/urls.py | 08d8ead5f975ed5214237be95c34115a48d77815 | [] | no_license | nsivaaws/docker1 | fa77bdea1061d0fbea3437fa3167e22744b80d57 | 2c4cf56ed1ddd07152e7d0efed0c4defd55f1678 | refs/heads/master | 2020-03-24T20:54:55.355771 | 2018-07-31T10:28:52 | 2018-07-31T10:28:52 | 143,003,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 212 | py | urls.py | from django.contrib import admin
from django.urls import path
from django.conf.urls import url
from . import views
urlpatterns = [
path('admin/', admin.site.urls),
path(r'', views.index, name='index'),
]
|
68a776d7fccc8d8496a944baff51d2a862fc7d31 | 09df68c721f724bdfa1d00f18d5ee6fffba548df | /61.py | 88ae68a3d00ddd4ceac9f6b18e6bc78019453379 | [] | no_license | NeilWangziyu/JZOffer | c8cde80cf54545244ebeb3a9fc88d5ac6b832622 | ce29ea836bd20841d69972180273e4d4ec11514d | refs/heads/master | 2020-04-23T06:19:48.434829 | 2019-09-25T12:35:38 | 2019-09-25T12:35:38 | 170,969,684 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 604 | py | 61.py | # flush in poker
def IsContinuous(numbers):
if not numbers or len(numbers) < 1 :
return False
numbers.sort()
number_of_zero = 0
number_of_gap = 0
for i in range(len(numbers)):
if numbers[i] == 0:
number_of_zero += 1
small = number_of_zero
big = small + 1
whi... |
a48ab6d1308b888e9e24ec7bd751c45c098dc186 | f0b741f24ccf8bfe9bd1950425d83b6291d21b10 | /components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/evaluated_annotation_pipeline.py | 12bff9008f2a6db624b2dc0ff9d5a6e7428f8339 | [
"Apache-2.0"
] | permissive | kubeflow/pipelines | e678342b8a325559dec0a6e1e484c525fdcc8ce8 | 3fb199658f68e7debf4906d9ce32a9a307e39243 | refs/heads/master | 2023-09-04T11:54:56.449867 | 2023-09-01T19:07:33 | 2023-09-01T19:12:27 | 133,100,880 | 3,434 | 1,675 | Apache-2.0 | 2023-09-14T20:19:06 | 2018-05-12T00:31:47 | Python | UTF-8 | Python | false | false | 12,347 | py | evaluated_annotation_pipeline.py | # Copyright 2023 The Kubeflow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
1fedf355a3bf4c4965274f181a9bae24414a3d66 | 7bef0300baec1c46e98e618dab2d04f0f3240c11 | /tests/test_utils.py | a540662b1e88295135466454fdc69ff708cfed55 | [
"MIT"
] | permissive | burchardtist/byt | 2da6b074a97437a1ce74a985b8657340d3e5bd87 | 327c4c6561bec2df42e56b01164988f135ad60f6 | refs/heads/master | 2020-03-27T16:48:45.613022 | 2019-03-03T13:16:12 | 2019-03-03T13:16:12 | 146,807,666 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 601 | py | test_utils.py | from byt.middleware.utils import make_iterable
def test_make_iterable_none():
assert make_iterable(None) == list()
def test_make_iterable_iterable():
test_list = [1, 2, 3]
assert make_iterable(test_list) is test_list
test_set = {1, 2, 3}
assert make_iterable(test_set) is test_set
test_tupl... |
2492cf943eb65d9b2aa8d7f219e877cc188371ba | 11a519112a80d86813e687dec1b5110b4851f8c4 | /SolarApp/src/lib/vehicleBreakdown.py | ee10cd1cca83cf1bd41bf946123ffdaefc665076 | [] | no_license | Anthonylam7/MESA-Lab | ee6577f5e5703e0136f04b296b5de5c6812214e3 | 0cc30608b6544c035ac00bc598e3dc7d0de3eb94 | refs/heads/master | 2020-12-01T20:43:59.790357 | 2017-12-15T16:00:23 | 2017-12-15T16:00:23 | 66,876,565 | 0 | 1 | null | 2017-05-08T16:55:36 | 2016-08-29T20:05:26 | Python | UTF-8 | Python | false | false | 1,332 | py | vehicleBreakdown.py | from kivy.uix.screenmanager import Screen, ScreenManager
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import StringProperty
from src.lib.screenContext import BaseScreen
class VehicleBreakdown(BaseScreen):
pass
class InfoBox(BoxLayout):
"""
Helper widget for displaying content in a ti... |
4c9f52eedee96acfa4d31663e9d3f01e439459fe | 36afa10e2dcafb68325ab40641966a36283d312b | /context_processors.py | 027c1c5b5e7be045a083a37b191ff53121b2ccb1 | [] | no_license | parulian1/foundation | 6b707bcbf8067165d80e3bdc58626e6bb9a4521b | 178b580f17fe3aad39824f8465cb5275dc019297 | refs/heads/master | 2021-01-10T05:22:25.360967 | 2016-02-11T03:58:59 | 2016-02-11T03:58:59 | 49,107,916 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 628 | py | context_processors.py | from django.conf import settings
def media_url(request):
"""
Returns context variables containing search form:
- ADMIN_MEDIA_PREFIX
"""
return {
'media_url_prefix': settings.MEDIA_URL,
}
def static_url(request):
"""
Returns context variables containing search form:
... |
a95f0781166dd649d730d79a910816fc940ad3aa | f34ff6d9989734aa041adbffed88b02422d45a63 | /replica-simulator.py | 00ed5e2f11d1f0d82c651deaf703d441a10c0553 | [] | no_license | llarsson/brownout-simulator | 52c24bfee5584c1bcd866c860c909447a7ad3cfe | 96ed09f46691f6c3192c6af5cbd8183de3470acf | refs/heads/master | 2020-05-16T16:35:07.234261 | 2014-05-06T08:05:20 | 2014-05-06T08:05:20 | 183,162,922 | 1 | 0 | null | 2019-04-24T06:30:21 | 2019-04-24T06:30:19 | null | UTF-8 | Python | false | false | 3,336 | py | replica-simulator.py | #!/usr/bin/env python
from __future__ import division, print_function
## @mainpage
# Documentation for the brownout load-balancer simulator. If confused, start
# with the @ref simulator namespace.
import argparse
import numpy as np
import random
from Clients import *
from Request import *
from Server import *
from S... |
aa2c3fc191b3169237528f426d3415b5c394834b | 98b20e5aab8da4514d7f16d75978f163c5af7b9a | /cc3200/bootloader/tools/read.py | 8a9ddb486726c94767f8f1fe7fdb1d42a64bb053 | [] | no_license | rdnelson/Proxima | d6d997aecd0d6fad248044ebf93345af22312e2a | 14698d98254f1b979163d2d182a148aae96174de | refs/heads/master | 2021-01-17T05:58:28.731725 | 2015-03-11T00:15:50 | 2015-03-11T00:26:40 | 24,566,086 | 0 | 1 | null | 2015-03-03T21:19:25 | 2014-09-28T17:52:07 | C | UTF-8 | Python | false | false | 596 | py | read.py | #!/usr/bin/env python
import serial
import sys
ser = serial.Serial('/dev/cc1', 921600)
ser.flushInput()
ser.setTimeout(2)
print "Waiting for response"
ser.write("r")
readConf = ser.readline()
if readConf == "":
print "No response, please ensure the device is in bootloader mode."
exit()
elif readConf != "read O... |
457c78a43cd702efeecff5b6e5528a9de9c272dd | c9c68211f8d76470a14a7b40b28e7997b2e34d68 | /renpy/minstore.py | c0de5872d0fa625e8d3377b527db486aee894591 | [] | no_license | renpy/renpy | 16e0526b76714ba1fc08c05bdd7417db5f2eeb8c | 517e12d3e5812b1849fb803f35727124d9cb75f1 | refs/heads/master | 2023-08-31T10:04:53.943394 | 2023-08-31T08:30:38 | 2023-08-31T08:30:38 | 4,815,490 | 4,094 | 940 | null | 2023-09-14T01:10:38 | 2012-06-28T01:21:22 | Ren'Py | UTF-8 | Python | false | false | 5,354 | py | minstore.py | # Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, m... |
27ccf21e4142cc1620f597b55969422d01a1f807 | 683b73e0c95c755a08e019529aed3ff1a8eb30f8 | /machina/apps/forum_permission/models.py | 88f9bfb4912dd8222d5f59399e3eb7f066d7f985 | [
"BSD-3-Clause"
] | permissive | DrJackilD/django-machina | b3a7be9da22afd457162e0f5a147a7ed5802ade4 | 76858921f2cd247f3c1faf4dc0d9a85ea99be3e1 | refs/heads/master | 2020-12-26T08:19:09.838794 | 2016-03-11T03:55:25 | 2016-03-11T03:55:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 616 | py | models.py | # -*- coding: utf-8 -*-
# Standard library imports
# Third party imports
# Local application / specific library imports
from machina.apps.forum_permission.abstract_models import AbstractForumPermission
from machina.apps.forum_permission.abstract_models import AbstractGroupForumPermission
from machina.apps.forum_permis... |
91908c0d47b240d5a87be5a6ce5fd0136d0b8103 | 706f75cfaa872a0e8a1159a87821aeae3a11523a | /data-analysis/numerical_weather_prediction.py | f69db9d525993f442316066de462bdc83d715a2d | [] | no_license | space-apps-goldilocks-zone/persunl | dc96464a1b04c61c4959e1836e9664827a79741d | 81a75cda7bfcd6081cb392f06b0cb4b43bbe3d21 | refs/heads/master | 2021-01-20T05:20:29.986216 | 2017-04-30T08:35:33 | 2017-04-30T08:35:33 | 89,772,423 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 557 | py | numerical_weather_prediction.py |
import pandas as pd
from fbprophet import Prophet
#Numerical weather prediction
#df is data frame for time series analysis
#frequency of the instances(hourly,daily,monthly,yearly)
def predict(df,frequency,period)
df[str(frequency)] = pd.DatetimeIndex(df[str(frequency)])
df = df.rename(columns={str(frequ... |
f1b38dce91a6895cc4701ee7436536f8667a54c2 | 095bad1ba5fd67e8c8ddad7339f81985f3ad5bc9 | /cinema_room/migrations/0001_initial.py | 83cf0e04b461be642467e55e9a4e799ac53e25a5 | [] | no_license | AStepanyan21/cinema | cfd9847d7054ad86e92243bab6552e2de3ca8e51 | 9e4fdb7d7eaf0f3ed774929eb781cb7d586f6125 | refs/heads/main | 2023-05-31T02:43:56.182327 | 2021-06-27T15:14:24 | 2021-06-27T15:14:24 | 380,516,923 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 954 | py | 0001_initial.py | # Generated by Django 3.2.4 on 2021-06-27 12:30
import django.contrib.postgres.fields
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('film', '0001_initial'),
]
operations = [
migrations.CreateModel(
name=... |
16732a595fafc90eab2aea88857c8403b5333f71 | a56c07732cbedd4a5983a0906f7fbe8e805066cc | /standardisation/src/prepare_data.py | 4d3767a305d37b7d6a1f56227c0ea70497074533 | [] | no_license | philliphungerford/dissertation | c49613c986b7df1efd7cc0c614d50679ad0a73c1 | 427db56b2a0b514c488c81774fdd55f4ea3aec26 | refs/heads/master | 2022-12-06T02:03:22.370243 | 2019-08-23T11:32:34 | 2019-08-23T11:32:34 | 178,778,691 | 2 | 1 | null | 2022-11-21T21:37:40 | 2019-04-01T03:25:31 | Jupyter Notebook | UTF-8 | Python | false | false | 6,818 | py | prepare_data.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 9 16:27:02 2019
@author: philliphungerford
Purpose: Data preparation file for dissertation standardisation (aim 2)
"""
# =============================================================================
# 0. Dependencies
# ===========================... |
208e2de12c27a25dd0bc696f4fdc64429bd9b003 | 9744980daf39e5da291c63a5d0c117e0501ef3d6 | /Practicals/Steve/01/number_of_rooms_V1.py | 3e80e0884b7751e989dfed6ab435bbf83c07036d | [
"Unlicense"
] | permissive | TonyJenkins/cfs2160-2019-python-public | 9143901d8cb16c98be8a456918720760c5aa76bd | 3bf9f9a905dfeb9f5e664ef5b27905acb224f422 | refs/heads/master | 2021-06-28T14:20:08.970444 | 2021-03-18T11:29:17 | 2021-03-18T11:29:17 | 211,312,296 | 13 | 6 | null | null | null | null | UTF-8 | Python | false | false | 850 | py | number_of_rooms_V1.py | #!/usr/bin/env python3
import math
"""
TASK - Print to screen the number of labs for a given number of students.
TODO (Primary path)
1, print welcome message
2, get number of students
3, divide number of students by the number of pcs in a room (need discussion - many ways to do this!)
4, print ... |
a6e4dcfa0e50adc78ee584edd73f5c449c74276c | a8a1a2d670b9d22197ba627aec251647451a0f01 | /dsply-ubit.py | 77c61894052b2377fa1f4fecedcc56a13709cc74 | [] | no_license | kleewm/rpi-ubit-ip-dsply | fd1ba50c0fcf6936fb1bb03e26d060b7c2043440 | 21967dd88c0c382c5ca2274aef03644905197a98 | refs/heads/master | 2020-03-10T16:33:07.359329 | 2018-04-16T13:54:36 | 2018-04-16T13:54:36 | 129,476,632 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,129 | py | dsply-ubit.py | #!/usr/bin/python3
#
# dsply-ubit adaptorMAC ubitMAC msg
#
# this works only on python3
# run the following to load bluezero module
# sudo pip3 install bluezero
# install bluezero code into MicroBit
# https://ukbaz.github.io/howto/ubit_workshop.html
#
# store in /home/pi and remember to chmod +x dsply-ubit
#
# kenneth@... |
5cedb2657c100f58814063ce4e53caafbac6a13d | bebe848155d4844906f97a63d7320d314d4252bd | /algorithms_sedgewick/my_work/chp1.5_union_find/quick_find.py | 42dd532d30c47ea0fb0214f695f00a8ba2b73eac | [] | no_license | gabrielavirna/coursera_courses | 08ea9554067eb62f060a6c23c9b4803fad394cb4 | b35351d255da0b031262277803bf9fc03f19f456 | refs/heads/master | 2021-01-23T08:34:40.764105 | 2017-09-05T23:18:29 | 2017-09-05T23:18:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,082 | py | quick_find.py | """
Quick-find [eager approach]
===========================
-> Data structure.
・Integer array id[] of length N.
・Interpretation: p and q are connected iff they have the same id.
-> Find: Check if p and q have the same id: id[1] = 1, id[6] = 0 => 6 and 1 are not connected
entry 0 1 2 3 4 5 6 7 8 9 {0, 5, 6},... |
cc283d2a4eca791e8ef7bbc265858f9b38a651d6 | 915fc556e28ab953606c2128fcea5fae9b2f31e6 | /py/common/arrays.py | d18671df246d3a7112763c83aa53073dd781884f | [
"MIT"
] | permissive | curtislb/ProjectEuler | 6a34cf6ad8d4375d9958338ac55186289d947b8d | 7baf8d7b7ac0e8697d4dec03458b473095a45da4 | refs/heads/master | 2020-04-15T23:51:34.393657 | 2020-04-11T03:16:41 | 2020-04-11T03:16:41 | 19,619,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,444 | py | arrays.py | #!/usr/bin/env python3
"""Common library for working with one-dimensional arrays.
This module provides functions for operating on lists and other array-like
collections. Examples include finding the argmin/argmax of a sequence,
calculating the cumulative sums of a list of numbers, and checking if two
sequences are pe... |
34530258166d6f10d2d8dea203f781d5c44d9f71 | 7ca2852ff8232a19f4b56aa482506b1b3cc0d53b | /testing/test_class_main.py | 6a3a8a354dfe409d42b96ab663be27598edba556 | [] | no_license | Dirc/Strategy_and_Economy | 850342e3c74f9ef12c9032f1c70ea8d528c7a922 | 078807bc29dbf803c6bd30bc8d0379ec94a45f6f | refs/heads/master | 2020-01-23T22:06:23.867435 | 2016-12-10T22:23:51 | 2016-12-10T22:23:51 | 74,611,366 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | test_class_main.py | '''
Created on 23 nov. 2016
@author: Eric Cornet
'''
from libs.man import Peassant, House
# create peassant
p = Peassant()
print p
print type(p)
if __name__ == '__main__':
pass |
c788dd1102306441d6a529ec0a6ec3be5d7bc57c | 15da43c78abc9320d614658271cc899e515bb46b | /test_test/trans.py | 700bfdce9ee1c60aa90018603bc705555ffa86ea | [] | no_license | Fern9/oa | 5d48abb48ca309e94beff1b8115eaf1cff37acea | 286db01a03c11c405febb01e03c810f64b18fdf4 | refs/heads/master | 2021-01-17T19:15:10.968570 | 2017-08-03T09:12:56 | 2017-08-03T09:12:56 | 95,563,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,144 | py | trans.py | def trans_up(string):
if string == 'class':
return 'className'
ans = ''
upper = False
for i in xrange(len(string)):
s = string[i]
if s == '-':
upper = True
else:
if upper:
s = s.upper()
ans += s
upper = False... |
85ed135c7f862935c398a05cef76ca28b12bce42 | 9460a3128717580f667db55451c4520c112b23cf | /sitado/utils_delivery.py | e0ebb2fc7a5026e2c79739f7fbe647f6b540fecd | [] | no_license | mohammadmozafari/miscellaneous-applications | 68c8e32067499770b643b1791b4e49267cd323ce | 4b06f983ec57774efdfaee84a9eb64821f0129a1 | refs/heads/master | 2023-01-08T14:21:52.125206 | 2020-11-09T10:48:23 | 2020-11-09T10:48:23 | 311,306,767 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,181 | py | utils_delivery.py | from database_engine import *
def show_deliveries():
print()
print_deliveries()
input('press enter to return to main menu')
def add_delivery():
print()
national_code = int(input('enter national code: '))
first_name = input('enter first name: ')
last_name = input('enter last name: ')
p... |
a3682998e557bd6c58e466040d37b152729298f1 | ae2008dee33eec97173903b9e76df0492670790b | /Code/wscript | 4d69feeb951fdf353c9c65e2a9d9697e9a881ca5 | [] | no_license | roche-emmanuel/LYSubstanceNG | 95e7bf171f57cb696ae9422cb3ad31d7c40d724e | 96030da728be9918c219090373829859ddb7fdb4 | refs/heads/master | 2021-01-20T04:25:40.119273 | 2017-05-05T11:22:03 | 2017-05-05T11:22:03 | 89,687,889 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,618 | wscript | ########################################################################################
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All us... | |
edb596a2ccd21c1467c8de9d49c5daed30888974 | ca7e2a5ae852a72f721d6f3c091555664e1794ab | /mail merge/merge.py | 86706da76f214e6fdeecf7f7d6647ab894d1a879 | [] | no_license | vaibhavmay89/scrappers | f62ec2b6ec9292fad4e5f53ef6a088ef6ced8b95 | 4a59a7043b801b8fa7f24e0a57ac892927f3c54b | refs/heads/master | 2021-01-17T06:28:35.544569 | 2015-05-22T05:16:43 | 2015-05-22T05:16:43 | 26,391,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,402 | py | merge.py | import os
current = os.getcwd()
os.chdir('D:/secrets/emailcredentials')
f = open('vaibhav.txt','r')
cred = f.readlines()
for i in range (0,len(cred)):
cred[i]=cred[i].replace('\n','')
me = cred[0]
password = cred[1]
f = open('data.csv','r')
rough = f.readlines()
for i in range(0,len(rough)):
rough[i] = rough... |
9c24527c4e6d196924b9300c84755dc633edc02e | fa6aafe8f863c671be8837477619b1e7a78cc970 | /tasks.py | c0ca5225aceea5c1869233f045c162432c5e2520 | [] | no_license | intriqet/Projects | e28efa4508edfaa22b57f71a1770022ae2d3d8b6 | 05b1a17a520adfffd0fd76aff00ced1505c7e3d0 | refs/heads/main | 2023-01-22T04:28:34.466982 | 2020-11-27T23:17:15 | 2020-11-27T23:17:15 | 315,093,068 | 0 | 0 | null | 2020-11-27T23:39:59 | 2020-11-22T17:25:38 | Python | UTF-8 | Python | false | false | 698 | py | tasks.py | from invoke import Collection, task, exceptions
@task
##(comport=None,filePath=None,address=0,blPath=None,phyInitPath=None,mainPath=None,partPath=None,clean=True)
def setup(c,**kwargs):
if not kwargs["comport"]:
return exceptions.Failure(result="comport is needed to use this command ", reason=exceptions.A... |
91971f7f2372ca6532039023a68d47a15b032647 | c70ab3b397a00d98cce8f9a1ab5462dac116f602 | /w7p3.py | 25c30f3098d12ca25e5b9fe4ffa51082359c10f2 | [] | no_license | Pepper0694/Informatics | ddadb1b65547242412ec493b9a89d991c618001a | edcc2f0a7ac6be9f555e26cf594a83d5320b8bf6 | refs/heads/master | 2020-09-11T15:50:55.428593 | 2019-11-16T15:14:03 | 2019-11-16T15:14:03 | 222,116,738 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,129 | py | w7p3.py |
# coding: utf-8
# # Week 7 Problem 3
#
# If you are not using the `Assignments` tab on the course JupyterHub server to read this notebook, read [Activating the assignments tab](https://github.com/lcdm-uiuc/info490-sp17/blob/master/help/act_assign_tab.md).
#
# A few things you should keep in mind when working on ass... |
9df7c3b6cc0ccab30237bd8617a9366951b0f599 | bd01a72e76783071ad3e3539ac38ac33ebcd67a4 | /FinancialLife/examples/dependencies.py | 3bbe03a30dff15c97e592bb9a2d9caf9dafe8e77 | [
"Apache-2.0"
] | permissive | davidu/FinancialLife | 708827a9ec28d128857e20a3e96b2d40474976ea | c330605defba6a54f656dc1dc28bad2b14907835 | refs/heads/master | 2021-07-08T18:18:53.961875 | 2020-10-19T01:48:01 | 2020-10-19T01:48:01 | 200,549,454 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 798 | py | dependencies.py | '''
Created on 14.08.2016
@author: martin
'''
# standard libraries
from datetime import timedelta, datetime
import os
# third-party libraries
# own libraries
from FinancialLife.financing import accounts as a
from FinancialLife.reports import html
from matplotlib.pyplot import show
def dependencies():
loan = a.L... |
d19176ddd91318fc4359b86cfed300229c105d15 | fa2b882b40c88c3690543a02430a5d024fd7b1d4 | /colorDetect.py | ca201a31d508cebe329949c174522cd136880d61 | [] | no_license | ScanLSG/ALLDOWN | 376c4a504a09b51d1d33463e6cd7e2860645eeaf | 19a9ca9ad37093900a296ee4f38d664d2cad0233 | refs/heads/main | 2023-08-10T22:47:52.572513 | 2021-09-17T07:45:14 | 2021-09-17T07:45:14 | 405,006,617 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 740 | py | colorDetect.py | # 使用OpenCV和Python检测特定颜色
# https://www.codenong.com/detection-of-a-specific-color-blue-here-using-opencv-with-python/
# black (0, 0, 0) white(255, 255, 255)
import cv2
import numpy as np
from numpy.core.defchararray import upper
# loading image
img_BGR = cv2.imread('D:\\Code\\ALLDOWN\\ALLDOWN\\alcoholImag... |
9aa9755e0a5a2cbea2777c7300574efbccf4076d | d3ef437235d07f7fc4f5571aa528eb21df26b3a0 | /Coletor e Padronizador de Microdados/Bases, Coletor e Padronizador/coletor.py | 860118571745503f0f2eb107490f997cd7a1d5bf | [] | no_license | luccasilva/CovidDataAnalytics | e8f9343ae48a61c598c972eacdd97cb078ea0eca | ad8a87ac63512fab320db892719a650d13d0d5ca | refs/heads/master | 2022-12-17T17:44:02.351442 | 2020-09-15T16:26:58 | 2020-09-15T16:26:58 | 295,777,541 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 692 | py | coletor.py | import requests
import ast
from bs4 import BeautifulSoup
file = open("dicionario.txt", "r")
contents = file.read()
base_url = ast.literal_eval(contents)
file.close()
def busca_base (base,url):
page = requests.get(url)
soup = BeautifulSoup(page.text, 'html.parser')
text = str(soup)
if base=="AM" or... |
f5d7cac1c1028e7022695deab7a0e079ea7534c3 | 3b710684aee2a35515cbaa40bbb8494b11f31a3b | /src/Hermes.py | 5d67de9707e9866abfe0cecfcf73e7149f7bdf91 | [] | no_license | SanyoGorbunov/TravelHackathonPrague | fc0feda3e074b4aa4b1c954a33c6a32f2c6aa4b5 | 74cd87460e6ad5e2c22a6f3290ce7cb29a4038ed | refs/heads/master | 2021-01-21T14:16:33.411422 | 2017-06-24T13:13:33 | 2017-06-24T13:13:33 | 95,259,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,715 | py | Hermes.py | import requests
import traceback
from random import randint
from datetime import datetime, timedelta
# --- Main handler ---
def close(session_attributes, fulfillment_state, message):
response = {
'sessionAttributes': session_attributes,
'dialogAction': {
'type': 'Close',
'... |
4eb159f870d90d7b6d471f5699c04ea40d18a0ac | 2034dc0e57cc4d6be1ceba18856dbb350f64c02e | /python/zip.py | 9835e0ca1587fe15f4a7d702567242c2820892f0 | [] | no_license | LiamWahahaha/study-notes | 278e30f24d7aaa6ce0530972e9b5140595669f4a | b8cbf36cc358d67aca43151ad2c4f8c2977092da | refs/heads/master | 2020-03-20T03:38:45.422748 | 2018-07-29T19:59:51 | 2018-07-29T19:59:51 | 137,153,875 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 322 | py | zip.py | names = ['Cecilia', 'Lise', 'Marie']
letters = [len(name) for name in names]
longest_name = None
max_letters = 0
for name, letter in zip(names, letters):
if letter > max_letters:
longest_name = name
max_letters = letter
print('longest name is %s, and the length is %d.'%(longest_name, max_letters)... |
27c05d289dff7007a3cd8beae77a8abe0898dd9f | 952f0ab942741edb1e5aa0dfec14ccd5b2be8f92 | /supercomputer/supercomputer/compute.py | 58e84ebd934cac88051c5d537dbc3f51d66aaebf | [] | no_license | Allegheny-Computer-Science-102-F2020/cs102-F2020-practical4-starter | dc169aba35e62d0ad1662377483a8224223ebaf4 | 2da09617ac0128f76c7c575beed8570a5962784c | refs/heads/master | 2022-12-30T02:35:30.410393 | 2020-10-16T13:51:25 | 2020-10-16T13:51:25 | 304,641,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,483 | py | compute.py | """Compute values using different arithmetic operations."""
import math
# TODO: Fix the defects inside of this source code
def identity(number):
"""Return the number."""
return number
def negate(number):
"""Return the negation of the number."""
# negating the number is going to return
# the op... |
8a84478e9a1723d746f0d681566db5a0dff29c4c | 78549ac02a3b4e263861c71c5c81f2fde04571c1 | /kMostFrequent.py | fd062328c3daedfd7515898bdd348d7db1458457 | [] | no_license | brandonjabr/InterviewPrep | 82e6d97aa755a843857b48a7b0256b76b5162311 | c2013f07bcd439a0d4612cbb4a07ef081c7b59e6 | refs/heads/master | 2021-09-03T21:26:21.027756 | 2018-01-12T04:50:30 | 2018-01-12T04:50:30 | 110,052,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | kMostFrequent.py | from collections import Counter
def kMostFrequent(nums, k):
"""
:type nums: List[int]
:type k: int
:rtype: List[int]
"""
return zip(*Counter(nums).most_common(k))[0]
nums = [1,1,1,2,2,3]
print kMostFrequent(nums,2) |
425f9961e4875d51256f6a0e1487f6c26c931227 | bf8d63a7201aced10d8fa4be0048764d6f4c4b05 | /rebalancer/testers.py | 87b47fb88bc8d042d116c9aff004d3a9f71b6356 | [] | no_license | devon-brazier/rebalancer.v2 | 2bb2ef2b0624f0d2f22f90813c0ebca3d96dc4c1 | 073c3468c9ea2345b7d3784ca2751486534d8c07 | refs/heads/master | 2023-05-10T22:54:07.661191 | 2018-09-03T11:48:16 | 2018-09-03T15:15:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,298 | py | testers.py | import csv
import time
import sched
import os
import datetime
import rebalancer.binance_api as api
import pandas as pd
from rebalancer.graphics import plot_portfolio_backtest as plt
class Tester(object):
"""
This object processes the information needed for a rebalance. Information is collected using the bina... |
60c4cd0529220e615e83a6671f082b60928dd806 | 86e1953042ca5e4ef38c0685ffff9c2909b109c0 | /GUI/MainFrame.py | bb59fac848649bf0bd03f8796044a923ad0bd922 | [] | no_license | mateuszbereszczuk/blackjack | f5f716ba55b5d777e3c4de80b78662a6e357f794 | d5d1ff83bde4aa753ff06ab871059742b1b386f4 | refs/heads/master | 2023-01-21T16:12:19.760399 | 2020-12-06T19:16:45 | 2020-12-06T19:16:45 | 314,639,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 633 | py | MainFrame.py | import tkinter as tk
from GUI.GameFrame import GameFrame
from GUI.OptionsFrame import OptionsFrame
class MainFrame(tk.Frame):
def __init__(self, parent, *args, **kwargs):
tk.Frame.__init__(self, parent, *args, **kwargs)
self.parent = parent
self.game_frame = GameFrame(self, bg='#008000')
... |
d15c114364c91c1d8fcea328683c80d51ffa260f | c83ca050a7c2305ae059cd315052211462b6b31a | /httpStudy/_02_httpServer.py | e68dbeddb5a9f74dfed56a1385a9d952812f5cd5 | [] | no_license | DavidZze/pythonStudy | a01108acd0cd66f9aba60a27f807cad84c7fa43a | 1e6fe48a562a0ea05938e8ddb03663339995caa5 | refs/heads/master | 2020-04-05T14:34:16.408148 | 2017-06-30T13:20:11 | 2017-06-30T13:20:11 | 94,689,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,216 | py | _02_httpServer.py | #! /usr/bin/python
# -*- coding=utf-8 -*-
"""
http Server:
模拟服务端接收http请求,处理http请求,并生成http响应报文。
"""
from BaseHTTPServer import HTTPServer,BaseHTTPRequestHandler
class RequestHandler(BaseHTTPRequestHandler):
def _writeheaders(self):
print self.path
print self.headers
self.send_response(20... |
c642eb3eb560bd26de1da34dc07cd8ce8a0270d4 | 74ea8033621df8db05a2cc5c1acdc85f7ea08d1b | /GAN/DCGAN_keras.py | acf48bbcf24e19d5496096d124bc9d04cb3e9010 | [] | no_license | CodingChaozhang/python_ml_code | 2583227c048fcf2f874fbf24405d42856da58243 | 2bf19bb5f737c3fbbc41e5e0d45304eb981b44aa | refs/heads/master | 2020-05-26T06:49:03.067219 | 2019-01-02T13:54:13 | 2019-01-02T13:54:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 107 | py | DCGAN_keras.py | # -*- coding: utf-8 -*-
"""
简介:
keras-DCGAN
Created on Sat Dec 15 16:46:19 2018
@author: gear
"""
|
24906315dd09be680d39bde8acb1174cf92d9043 | 00da01b831d58f4cbae5c3625823849dde3eff67 | /contests/Rockethon_2015/B_rule.py | 9e55f09bce77ec2717ae20db91d50a65d19779e9 | [] | no_license | atupal/codeforces | 577b2c084b9cf047c5780f840e9fe49fcb0fd50a | 563c3e27e0450b3dde24661a606c84b1a8d81f17 | refs/heads/master | 2021-01-15T22:10:07.657554 | 2015-10-12T06:58:10 | 2015-10-12T06:58:10 | 10,015,882 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 700 | py | B_rule.py |
def cl(a):
a = [0]+list(a)
l = len(a)
s = 0
for i in xrange(1, l):
for j in xrange(i, l):
s += min(a[i:j+1])
return s
import itertools
for x in xrange(1, 9):
c = cl(xrange(1, x))
cnt = 0
for a in itertools.permutations(xrange(1,x)):
if cl(a) == c:
cnt += 1
print a, '->',... |
fd1be957d9bb5d7cb9b83441776aa118857fae28 | 5cfb41e031cd0479422cd4f0ff85af6cd903302b | /Lista2.py | 1417cee355041478cd083564d7f3edd77065ab61 | [] | no_license | EduardaHelena/FundamentosP2 | 46a0b1ca3ca7876e91d9b8518f16038015686a52 | 3275ceeda41d29318d16f6d7a3a322803d3e7647 | refs/heads/master | 2020-04-08T21:01:57.369684 | 2018-12-17T02:41:18 | 2018-12-17T02:41:18 | 159,725,842 | 0 | 0 | null | null | null | null | ISO-8859-1 | Python | false | false | 4,791 | py | Lista2.py | #-------------------------------------
# Questao1
#n1 = input("Numero 1: ")
#n2 = input("Numero 2: ")
#n3 = input("Numero 3: ")
#if(n1 > n2):
# if(n1 > n3):
# print "n1 maior"
#else:
# if (n2 > n3):
# print "n2 maior"
# else:
# print "n3 maior"
#-----------------------------... |
b4392188e47af40e22e9f813d9341f5dfa6168ea | 9bc55f3813a68284b22fd2b921fbd8157e9609b9 | /3.28 Error.py | 8a2f107685144635743838296474ae3601df1386 | [] | no_license | fahmialiasakbar/py-beginner | d84a3e671cedca730f5a5ce142b4b5a7149be8fe | 1e5a5a87638fc77a5ecc59023b20318d5d956232 | refs/heads/master | 2023-08-23T16:16:01.323880 | 2021-10-29T14:23:36 | 2021-10-29T14:23:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 111 | py | 3.28 Error.py | try:
n = int(input("Enter number : "))
print(1+n)
except ValueError:
print("please write a number") |
b70225f3d87e099b5f1654f13d88a3c990e17e41 | 02f14c4453e1848bf4667687597ab63233579afc | /projects/adventure/map.py | 1415f56b8f3ab8e2384115067753fc6b37e232df | [] | no_license | chrishuskey/Graphs | b1b2f916ef3c29c516cd2ba4176f1681f2ead074 | 5c3623d069abe770c36c1d1a0da46e5b648bb38e | refs/heads/master | 2022-12-11T00:51:14.617262 | 2020-08-20T23:04:45 | 2020-08-20T23:04:45 | 287,389,092 | 0 | 0 | null | 2020-08-13T22:08:18 | 2020-08-13T22:08:17 | null | UTF-8 | Python | false | false | 11,260 | py | map.py | """
Implementation of a partial map in our adventure game as a graph.
"""
# Import libraries, packages, modules, classes/functions:
from data_structures import Stack, Queue
# Fixed constants:
directions = ["n", "s", "w", "e"]
class Map:
"""
Represent a map as an adjacency list (dictionary of graph vertices/r... |
30e64459364ef9a2c6a10ba6eaa990de7dd7710f | 6d5efebfd8bafd12b8b67ab6db488d560d5fa514 | /job.py | 0fa1dabfb6974ae3033f3aad1c5b5697fee39766 | [] | no_license | Ranxf/device | d7a1c54783d04dbc3fae70c77f139e77735a9b4f | fa7bfbd2055aee418d65b27eafa4e52f156a77c2 | refs/heads/master | 2021-07-20T06:00:43.077923 | 2017-10-30T03:06:55 | 2017-10-30T03:06:55 | 108,795,146 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 704 | py | job.py | #! /usr/bin/python
import yaml
import glob
import os
class job:
def __init__(self):
self.jobs={}
self.jobs_dir=r'job/*.yaml'
def get_all_jobs(self):
file_list=glob.iglob(self.jobs_dir)
for f in file_list:
name=f[4:-5]
with op... |
b61d803ed168025c5445c42f2ee91c97ab8d9b46 | 991fc97fa022c0d7f6ae5bc6844b7b1e9e013589 | /domain/achievement/models/Goal.py | e089c0737070d9f3884dfa90c5db6c796f0e667b | [] | no_license | pseudobabble/ufunction | 436c143801933c23a23404b34525402ffaf8587e | 6cd04061a7dca99aa5a5aba2caec0f778eb98aee | refs/heads/master | 2023-05-28T08:10:32.599993 | 2020-07-01T06:21:02 | 2020-07-01T06:21:02 | 276,285,944 | 0 | 0 | null | 2021-06-10T23:07:02 | 2020-07-01T05:34:15 | Python | UTF-8 | Python | false | false | 1,990 | py | Goal.py | #!/usr/bin/env python2
from django.db import models
class Goal(models.Model):
parent_goal = models.ForeignKey('Goal', verbose_name=u"Parent Goal", related_name="subgoals", null=True)
verb = models.CharField(
u"Verb",
max_length=300,
help_text='Which action do you perform to satisfy th... |
201424db3746c6b647cef949c446cb374d1cb321 | 97670bcf66a0f494ca51ba29e8370be82a714eb1 | /66plus.py | e6f7a7032a42607333afe16a49b193635066f8c8 | [] | no_license | duwenzhen/leetcode | 0ac8f143a7f1f048727fbbb4937e973ff04d19eb | 9c4fa66e4f5053bc66196cd0ff9ad102ef93c5dc | refs/heads/main | 2023-02-26T12:36:41.510985 | 2021-02-06T15:53:27 | 2021-02-06T15:53:27 | 324,864,246 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | 66plus.py | from typing import List
class Solution:
def plusOne(self, digits: List[int]) -> List[int]:
res = []
remain = 1
while len(digits) > 0:
d = digits.pop()
res.insert(0, (d + remain) % 10)
remain = (d + remain) // 10
if remain != 0:
res.i... |
596e2b04ac10c9c9e5490baf65de7c3a76799ee2 | a66a19ace0f48f90a6180e0fa57cdf9539951197 | /kheppy/evocom/ga/__init__.py | 3f43aafc6c29c181ac867ccac278abfbd9f3ffba | [
"MIT"
] | permissive | Ewande/kheppy | c739f6465cee8e2bafb5fef81db778c66decff86 | 5c5f6bacbf9020053879947798983547de4c1c79 | refs/heads/master | 2020-02-26T15:08:42.717810 | 2019-09-12T20:53:18 | 2019-09-12T20:53:18 | 83,582,416 | 0 | 0 | MIT | 2019-08-27T23:05:22 | 2017-03-01T17:33:48 | Python | UTF-8 | Python | false | false | 33 | py | __init__.py | from .ga import GeneticAlgorithm
|
0ff9b9731bdab5c7a8481eecad2419aa74e0290e | 87c8ea5b71eddf46d78d09e20648c4abd74b9a06 | /tradesystem3.py | 991c913d523ad34025b053b83212e3aa9ed3d42a | [] | no_license | qizhenhua/finan | a77fd14785b9acf167bb4407d269d1d14ca08fe0 | 2bcd6488d8e3c3154de6261ff68530d09b183033 | refs/heads/master | 2020-05-19T12:58:41.210122 | 2019-07-21T15:09:17 | 2019-07-21T15:09:17 | 185,027,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,041 | py | tradesystem3.py | #Author: QiZhenHua 20190721
import Investment
market=Investment.Marketfund("000962")
market.readfund()
rateave=(max(market.NAVlist)+min(market.NAVlist))/2
ratescope=max(market.NAVlist)/rateave-1
ratesellshort=ratescope*0.2
rateselllong=ratescope*0.6
ratebuy=ratescope*0.05
ratepulldown=ratescope*0.4
print("r... |
2467f0b9a1aa55b40bb725a0899a64722e92b22a | d9699fb03936823484207bfa0dc6a0f8b7b55823 | /epm-server/src/libs/store/load.py | d0ad9784327fae7a61249c7dedc2b26f70d44bc6 | [] | no_license | ghostcommander0102/EPM | 1e05c5a28cd3157047f8913df20ce786bad74fda | 44e33263d3886c2a255e6a463eea2ebd0d0b727e | refs/heads/main | 2023-06-28T22:16:37.822464 | 2021-08-03T13:35:38 | 2021-08-03T13:35:38 | 392,327,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,844 | py | load.py | import json
import os
import pandas as pd
from server.settings import base_dir
if __name__ == '__main__':
csv_path = os.path.join(base_dir, "data/csv", "patients.csv")
df = pd.read_csv(csv_path)
df = df.fillna('')
data = df.to_dict(orient='records')
patients = []
for row in data:
pa... |
fb7c8b44416a8b7d149b18a1ba661d6377721092 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03844/s272995788.py | c333be350ef9d5b2783b0c2c0d75932fd98673af | [] | 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 | 40 | py | s272995788.py | a,o,b=input().split();print(eval(a+o+b)) |
ba3134047ac2332648ac222e502b707a74146ebd | 3d9e5726c58086a7d41997f9dfaf88e7ba903c1c | /rss_feed/feeds/migrations/0001_initial.py | 770bb54ca1e2b94efb94dd7b2559273f9c5dd693 | [
"MIT"
] | permissive | MahmoudFarid/rss_feed | 11a22c55003412bb5588f957fa553e660a291f3c | d722b538977d419c89622c213059595ec07f5a2a | refs/heads/master | 2022-12-02T09:38:12.015446 | 2020-08-10T21:45:46 | 2020-08-10T21:45:46 | 285,309,302 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,814 | py | 0001_initial.py | # Generated by Django 3.0.9 on 2020-08-08 23:58
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappab... |
ef4c0ada561024219ae57b23d6aa6d47141df816 | 91972cffc0e95e634c5752a2befdf141c494c24d | /PageObject/common/log_utils.py | 4d70b7e16db6445010d3fa52c865b171794588b2 | [] | no_license | liseen001/MyProjects | 99d48fe58109565eec4eabf027f892b4881b5df0 | 0572de7a6f78a9d9474971e98794d88bce03994d | refs/heads/master | 2023-05-15T06:02:19.969378 | 2020-09-07T15:31:08 | 2020-09-07T15:31:08 | 258,478,084 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,665 | py | log_utils.py | # -*- coding utf-8 -*-
import os
import logging
import time
from PageObject.common.config_utils import conf
current_path=os.path.dirname(__file__)
log_path=os.path.join(current_path,'..',conf.log_path)
class LogUtil(object):
def __init__(self,loggr=None):
self.log_name=os.path.join(log_path,'UITest_%s.log... |
82bb4d8c96bcee4dba95aa6d3355fd0136540b83 | 1263e72fb1554c645795bc9e8a627e299230edc8 | /Unit_Budget/Python_File/old_tests/test_Create_Table.py | f3dcf9cb0ca9a024ce42aa033086bca282b56e0b | [] | no_license | WentworthJin/Unit_Budget_Planner | 7ca2f317ccb221fbdbff3631bbd58c372ecd505e | 50d1b568d851334d70e843d0cfe005ce56659515 | refs/heads/master | 2023-08-27T07:14:30.528624 | 2021-10-27T07:43:00 | 2021-10-27T07:43:00 | 390,626,583 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 985 | py | test_Create_Table.py | import unittest
import Create_Table
import sqlite3
import sys
import os
from sqlite3 import Error
'''
*** The Test will automatically delete the database file it created ***
'''
class TestCreate(unittest.TestCase):
# Check if Shcema & create_connection function works, and wether the
# Database has been cr... |
48e06717e9b7519b63181de3de0afe536c9e71ba | 41c28bc616ee722a47a64c139d2171a183724b16 | /scrape.py | 52af5b9d0706a84e8df07f820b804ec5d5246258 | [] | no_license | kalyan678/SemanticNetworkStockMarketAnalysis | eda2fc38cb9d5e5afd6e02940e27e3d2ba3eefd8 | 3a186c6e5e5f9696908e3c241360a56428e6148c | refs/heads/master | 2022-08-02T02:13:59.441070 | 2020-05-22T21:17:38 | 2020-05-22T21:17:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,979 | py | scrape.py | """
Using NewsAPI:
API Key: 798a9003a6254698ad9117441ce75124
"""
import json
import requests
import csv
import pandas as pd
from newsapi import NewsApiClient
from newspaper import Article
################## Helper Functions ##################
def read_url(url):
"""
Read text from url using Newspaper
"""
article = ... |
6380af8b4a8b7178ae11e491426c304574074dbd | 9de47a8004fa176c1fbdcb7755d1e58fc0b07272 | /tug/__init__.py | f179b88f9a847391a2ce100db4afb543ad3d4836 | [
"Apache-2.0"
] | permissive | metocean/tugboat-py | f7c49755376765cf15aaded25e595c6198c421e7 | b8de53eb9b9e9732a9e361cb7bf3b271909e1bd0 | refs/heads/master | 2021-01-21T04:54:51.833067 | 2016-07-27T02:04:52 | 2016-07-27T02:04:52 | 37,697,196 | 3 | 2 | null | 2015-08-20T04:20:43 | 2015-06-19T02:28:16 | Python | UTF-8 | Python | false | false | 62 | py | __init__.py | from __future__ import unicode_literals
__version__ = '0.7.0' |
2a2ca898be8568870aaa036b7bc8b5bb0d5c6578 | 0e72d5ff65512382e788a6be80c53204f49bf8be | /src/Escavador/Auth.py | f576bf1fe99e180afdba1056275c6c8e4cc9d8f3 | [
"MIT"
] | permissive | sswellington/armadillo | 1ced3e7e023a4865d722be1e62501aad44e24803 | 292afd5c8286e8ba8fe0d53d88f4d374f542aeb8 | refs/heads/main | 2023-04-06T00:17:42.144038 | 2021-04-29T23:05:40 | 2021-05-03T15:37:21 | 358,960,029 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,454 | py | Auth.py | import json
import logging
import requests
from Escavador.Library import Frame
class Auth(Frame):
def __init__(self, email, password):
logging.basicConfig(filename=('log/auth_status_codes.txt'),
level=logging.DEBUG,
format=' %(asctime)s - %(levelname)s - %(message)s')
... |
d73491d6673abdabad85176c5f75a191995c806d | 5dad996f0570cad7ad29b24b4bc4811c12e7e99d | /blogs/urls.py | 1ddb6298bdd1860530cd29d6791432d04c821c56 | [] | no_license | grv20/Blogsite | 721fbbe184a3f1d5c3525511505a888d36f8f618 | 4e0c054ccceeebbc691b24c7fc9aeb898addc667 | refs/heads/master | 2022-12-06T02:35:22.638678 | 2020-08-18T11:48:21 | 2020-08-18T11:48:21 | 286,917,130 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | urls.py | from . import views
from django.urls import path, re_path
app_name = "blogs"
urlpatterns = [
path('', views.index, name='index'),
re_path(r'^blogs/(?P<blog_id>\d+)/$', views.blog, name='blog'),
path('new_blog/', views.new_blog, name='new_blog'),
re_path(r'^edit_blog/(?P<blog_id>\d+)/$', views.edit_blog, name='edit_bl... |
618b6c74133e181ce5cbaf4e969d9fc3aa44ce98 | c6778674b408fc6c560b046ce74b9672a29ed14c | /toasty/tests/test_multi_tan.py | c933c0fddb0fd36d89890de9ff43c7162af72524 | [
"MIT"
] | permissive | WorldWideTelescope/toasty | 0b91fc851a4870bd3cb3e20d16dfcfc929aa9170 | 3f0c5e02a6d437b04dfc092f1bd6539f58e9fa11 | refs/heads/master | 2023-09-05T16:28:55.199491 | 2023-08-18T00:17:51 | 2023-08-18T00:17:51 | 200,071,988 | 0 | 4 | MIT | 2023-08-18T00:17:53 | 2019-08-01T15:05:26 | Python | UTF-8 | Python | false | false | 7,673 | py | test_multi_tan.py | # -*- mode: python; coding: utf-8 -*-
# Copyright 2019-2021 the AAS WorldWide Telescope project
# Licensed under the MIT License.
from __future__ import absolute_import, division, print_function
import numpy as np
import numpy.testing as nt
import os.path
import pytest
import sys
from xml.etree import ElementTree as ... |
f5f9a1c7dcb7345e24f50db54649a1970fc37185 | 60a79b1b57340ab6bad1fb02129485aa64f19265 | /packages/basemap/doc/users/figures/cea.py | e15dbb77515b0054b8d38be1356e2a65ccd26355 | [
"MIT",
"LGPL-2.0-or-later",
"LGPL-3.0-or-later",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | matplotlib/basemap | a144628089ae9026e35f5f9395a09de6331b32d5 | 74da1636042685204afa7f34ddf9e2bbb4ea670c | refs/heads/develop | 2023-09-01T13:17:49.785995 | 2023-08-23T12:15:26 | 2023-08-23T12:15:30 | 1,385,085 | 689 | 487 | MIT | 2023-07-23T16:33:31 | 2011-02-19T02:58:42 | Python | UTF-8 | Python | false | false | 668 | py | cea.py | from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
# llcrnrlat,llcrnrlon,urcrnrlat,urcrnrlon
# are the lat/lon values of the lower left and upper right corners
# of the map.
# resolution = 'c' means use crude resolution coastlines.
m = Basemap(projection='cea',llcrnrlat=-90,urcr... |
76dd4d2b5f68683c77f9502a2298e65c97db7c8d | bbf0d9e89253b09658a7670cbb8246dda82ea4d1 | /src/slizzy/config/configerror.py | c80d3df978e0d017f63108f826af5178b9d4522f | [
"BSD-3-Clause"
] | permissive | matheushsouza/slizzy | e629a17ef869088ed5cca3ea1d52367be64040b7 | f224b8e4621d11031315da9178202781b4a2dcef | refs/heads/master | 2020-11-28T12:56:50.349212 | 2019-12-24T00:52:05 | 2019-12-28T19:19:34 | 229,821,282 | 1 | 0 | BSD-3-Clause | 2019-12-23T20:52:13 | 2019-12-23T20:52:13 | null | UTF-8 | Python | false | false | 38 | py | configerror.py | class ConfigError(ValueError):
pass
|
f16d43d9dfb3e9b9589fa92eb82aaa4c73fe48cd | 5e1ffbe55f95521ca7bb99951f5776b609b8525a | /ui/views.py | 4b21c2c1ff515e38f81c1b3f876040c169af61df | [] | no_license | tammoj/pdp-web-app | 4e4cb59c553a1d0a5f13d1d6923362f0c1f4b980 | 021497d19b317bc91292a508399693d0d24f7bdd | refs/heads/master | 2021-05-28T20:34:22.751249 | 2014-05-11T14:12:02 | 2014-05-11T14:12:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 958 | py | views.py | from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from orders.models import Setting
def search(request):
return render(request, 'ui/search.html')
def search_printed(request):
print_url = ''
setting = Setting.objects.filter(name='printer').first()
if setting ... |
dc81ab808720c3a2c76174264c9be9bcdd99c292 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02272/s513789824.py | 96b622c72e20ee0d8c9fae79c704ee442b0e4b6d | [] | 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 | 669 | py | s513789824.py | A = []
ans = 0
def merge(left, mid, right):
global A
global ans
n1 = mid - left
n2 = right - mid
l = []
r = []
for i in range(n1):
l += [A[left + i]]
for i in range(n2):
r += [A[mid + i]]
l += [10**18]
r += [10**18]
i = 0
j = 0
ans += right - left
for k in range(left, right):
if l[i] <= r[j]:
A[... |
a6192e39d86005882d0bde040a99f364bf701c3b | de0ec9f77231746b76dacaf1f10f705675ec1188 | /python/MergeSort.py | ac3629838ac79160d7efbac2e9fff46122fcaaa9 | [] | no_license | HanshengLi1993/algorithm-sort-summary | 52c57c44ee5218d31267dc89c260824066dcfa19 | 32ff1e322017c97712dd6a7ba3a795804b6bbea8 | refs/heads/master | 2020-04-01T18:13:37.384001 | 2018-10-19T01:12:05 | 2018-10-19T01:12:05 | 153,479,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,003 | py | MergeSort.py | # -*- coding: utf-8 -*-
def merge_sort(mlist):
if len(mlist) <= 1:
return mlist
mid = int(len(mlist) / 2)
# 使用递归将数组二分分解
left = merge_sort(mlist[:mid])
right = merge_sort(mlist[mid:])
return merge(left, right) # 将每次分解出来的数组各自排序,合并成一个大数组
def merge(left, right):
"""
... |
7cbf2082d530c315fdcfdb94f5c6ac4755ea2081 | 56298977190a316f5a1747cb82b7597f60553fcb | /console.py | 3c7c48f838883a92acc87e7f169e67b16042db51 | [] | no_license | BlacksThunders/AirBnB_clone | 7a61f39ef290202031c05efe4be5168fdeda0359 | caf52239a6249496c0e67c2f4d707c108d56fb50 | refs/heads/main | 2023-06-21T02:07:22.036074 | 2021-07-17T10:31:05 | 2021-07-17T10:31:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,679 | py | console.py | #!/usr/bin/python3
"""
program of the command interpreter
"""
import cmd
import models
import re
from models.base_model import BaseModel
from models import storage
from models.user import User
from models.state import State
from models.city import City
from models.amenity import Amenity
from models.place import Place
... |
4db8b4403dd9064b7d5f935d4b9d111508c965fb | ec51a8ac0736096d2363fc59f4f106adae18af7b | /src/cvmo/context/views/index.py | 1367b933be3a1bcf39f0f4067082a01c1dd5efae | [] | no_license | wavesoft/cernvm-online | 2dcf82eacbec5c6b30c4883f90c7f3ed04b89024 | 114baab5651a68a18daf3c769a87725639e3b550 | refs/heads/master | 2020-04-05T23:34:35.429453 | 2013-10-14T09:27:00 | 2013-10-14T09:27:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,016 | py | index.py | from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.db.models import Q
from cvmo import settings
from cvmo.context.models import ContextDefinition, Machines, ClusterDefinition, MarketplaceContextEntry
from cvmo.context.plugins im... |
816c11717c4f26b9013f7a83e1dfb2c0578cbcf8 | 576622461eb6fe41dee1e4b12947b6f9c8410a8e | /yama/mongo.py | 68d184d92e0563520f619961e6551eae4cac53f6 | [] | no_license | aragaer/yama | 6fdac454afc85147081c6e2ca6a0f57beb79ff10 | 5cfd99ffdcd0b122287751735543af65c9bb512d | refs/heads/master | 2022-06-21T08:22:35.447951 | 2020-02-24T22:13:32 | 2020-02-24T22:13:32 | 30,691,053 | 0 | 0 | null | 2022-06-03T22:42:51 | 2015-02-12T07:31:59 | Python | UTF-8 | Python | false | false | 1,387 | py | mongo.py | from yama.record import Record
class MongoStorage(object):
_collection = None
_connection = None
_root_id = None
_roots = None
def __init__(self, connection):
self._connection = connection
self._collection = connection.objects
self._roots = connection.roots
root_... |
5a09db58b3d2aecbc0360555afc0e4008142bee1 | 4637fc7240bdca2b4344a4c11fdfd7d044ea43de | /numpytest.py | 3c83d54a2c9fa00211fa44830ebbcf401a54cd02 | [] | no_license | kimkm0828/day0402 | 88e214dd7675c41792a1d098dc6552b2d4c4df82 | 3b798765cc623ae22afb6fe56f4d871d5cdaa461 | refs/heads/master | 2020-05-04T07:33:37.035971 | 2019-04-02T08:16:16 | 2019-04-02T08:16:16 | 179,030,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 247 | py | numpytest.py | import numpy as np
a = [0,1,2,3,4,5]
arr = np.array(a)
arr2 = arr.reshape(2,3)
print(arr.shape)
print(arr2.shape) # 몇행 몇열인지?
print(arr.ndim) # 몇차원인지?
# b = np.array(5)
#
# c = np.array(a)
#
# print(c)
# print(type(c)) |
87af259f571f7fca977f130cbb8c3e150c956d1e | 96324ac0053ad129583b06761c2b9e9b88265597 | /build/lib.linux-x86_64-2.7/pymark/packer.py | 5eefcd09c44363d817f728f4049bd3e8df05aa14 | [
"BSD-2-Clause"
] | permissive | Python3pkg/PyMark | 90a75fe5f3fd4a08ba7dd03d72cfba29eb66cb52 | be301ad4627729556f690a384b445710817dc3df | refs/heads/master | 2021-01-21T18:43:56.041688 | 2017-05-22T17:24:07 | 2017-05-22T17:24:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,370 | py | packer.py | """ Compiles objects to the PyMark binary spec. """
from struct import *
PyMarkInt = 1
PyMarkLong = 2
PyMarkFloat = 3
PyMarkDouble = 4
PyMarkBool = 5
PyMarkNone = 6
PyMarkString = 7
PyMarkTuple = 8
PyMarkList = 9
PyMarkDict = 10
PyMarkVersion = 1
def pack_file(filename, o):
f = open(fi... |
494f2851686c4c45c9f5b8c01cbca298ea81580e | 419637376e445ec9faf04c877d5fb6c09d15903f | /steam/user/member/addressDefaultTest.py | f682bca4614cf511150420d9438029206afc7e7b | [] | no_license | litaojun/steamOmTest | e4203df30acafaa5e282631d77429c0e4483fb88 | 86f84dbd802d947198823e02c2f1ba2695418a76 | refs/heads/master | 2020-04-02T21:48:55.115389 | 2019-07-11T06:08:27 | 2019-07-11T06:08:27 | 154,812,217 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,217 | py | addressDefaultTest.py | from steam.util.testJsonFormat import initInputService
from steam.util.steamLog import SteamTestCase
from opg.bak.testcaseRunMgr import runTestOneCls
from steam.user.member.addressDefaultService import AddressDefaultService
from steam.user.member.userAddAddressService import UserAddAddressService
from steam.user.member... |
984f72f69c6bab10700e0e56ce4a679cc17f3ad8 | 115742b22104a5aea7d60feb48f85e644ff3d3ad | /blink.py | 469efb6768944e3cf053a43f1446d541c00b7b48 | [] | no_license | rubinhozzz/knight_rider | bcf8bd757555e8b6977d9e46b12ec62b9d53d7c0 | da1952ce97b48446708576ab02487ba28aa23d26 | refs/heads/master | 2020-03-06T20:23:25.842956 | 2018-03-27T22:18:52 | 2018-03-27T22:18:52 | 127,051,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 286 | py | blink.py | import time
import RPi.GPIO as GPIO
pins = [4, 17, 22, 5, 20]
GPIO.setmode(GPIO.BCM)
while True:
for pin in pins:
GPIO.setup(pin, GPIO.OUT)
GPIO.output(pin, True)
time.sleep(0.03)
GPIO.output(pin, False)
time.sleep(0.03)
pins.reverse()
|
899732d8558ab931e476f1046f0196135197e934 | ef2bf4623ac350896fc76c12f0f143c28ab86172 | /hsapp/migrations/0024_post.py | fe893bafe3cd00a525257eb038134ca803abd62f | [
"MIT"
] | permissive | jkbm/playesports | a99e34bd3130e197f6755ddf453d77282e9994a4 | 1e01c909f183499906b26858fc54735dba5409d9 | refs/heads/master | 2022-12-09T14:23:42.938868 | 2022-01-08T15:45:10 | 2022-01-08T15:45:10 | 154,186,637 | 0 | 0 | NOASSERTION | 2022-12-08T00:45:36 | 2018-10-22T17:30:03 | JavaScript | UTF-8 | Python | false | false | 975 | py | 0024_post.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-27 21:28
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('hsapp', '0023_match_likes'),
]
opera... |
8f83f1cf37bb4395982211d8ae4be03e1803d74c | 910cf7d82a30ce57b2fa9094c6f83f369901e88d | /bk_easy_ai/part3/p209/Exchange Rate.py | 1e7d28741c8f74433a4d7ccf2e96923da8051aad | [] | no_license | agapeuni/python_bk_ai | 1b602a6caf53a7edf1ff0f692ed3d2d1b4ad8869 | 0d04cb751290798d7a381ff307fe78cfc9c5d5c5 | refs/heads/main | 2023-09-04T19:38:11.939299 | 2021-11-14T23:38:13 | 2021-11-14T23:38:13 | 391,248,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,454 | py | Exchange Rate.py | # LSTM에 의한 환율 예측 프로그램(원-달러화 환율 사이트에서 가지고 옴)
# https://kr.investing.com/currencies/usd-krw-historical-data
import numpy as np
import matplotlib.pyplot as plt
import math
import pandas
from keras.models import Sequential
from keras.layers import Dense, LSTM
from sklearn.preprocessing import MinMaxScaler # py -m pip ins... |
d9a64818abcaa0aadaf0361b77fa4e8b17d16498 | f52adf6255604f788632064a5170cd4ed242422b | /36633074/blackjack_game.py | ddef3d31f3535e484726d81ee39012130ec9ea49 | [] | no_license | Subohi/BlackJack-Game-Project | 908dff918cbb4001f55b0c990f30624ca3880cbd | be56825b7e6a3f0d8b344317ea2082833f65db31 | refs/heads/master | 2022-12-08T19:01:08.006139 | 2020-09-02T10:06:05 | 2020-09-02T10:06:05 | 292,246,388 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,441 | py | blackjack_game.py | from player import Player
from dealer import Dealer
class BlackjackGame:
def __init__(self, player_names):
self.dealer=Dealer()
self.player_list=[]
for i in player_names:
playerobject=Player(i,self.dealer)
self.player_list.append(playerobject)
def... |
d8766a00c344a67a44204b614e97012201566328 | 966bb43319aee92e233df4fc4eb0d4870a23e65e | /pyins/tests/test_transform.py | d074afa9fc1e4eb7e5893906498262b3dd0007cf | [
"MIT"
] | permissive | nmayorov/pyins | a52ef2da0568f43e9c9caaed40d23b66e95e5508 | 211c018cafb3c9a2cb86824ab7d28a49b89966bf | refs/heads/master | 2023-08-10T14:33:14.571861 | 2022-06-13T17:25:39 | 2022-06-13T17:25:39 | 67,255,265 | 70 | 30 | MIT | 2023-07-06T23:00:34 | 2016-09-02T21:14:52 | Python | UTF-8 | Python | false | false | 1,707 | py | test_transform.py | import numpy as np
from numpy.testing import assert_allclose, run_module_suite
from scipy.spatial.transform import Rotation
from pyins import earth, transform
def test_lla_to_ecef():
r_e = transform.lla_to_ecef([0, 0, 10])
assert_allclose(r_e, [earth.R0 + 10, 0, 0])
r_e = transform.lla_to_ecef([-90, 0, -... |
3c7f756a8b9956b0c2aa12f236fe4fbc5e428fbc | 44919a869279a4b0569e4dbcd24d8efce321f4f2 | /roi_extract.py | 52906dee26b0a953373b46a883d3cf1126c1c62a | [] | no_license | HauWong/Tool_Box | e682ea1429bdb31e11c28c542935894bf3af2f0b | d5e0decfde0e823ddb6b08a31e9843d923c96fec | refs/heads/master | 2021-07-02T00:10:19.537128 | 2020-12-05T10:47:36 | 2020-12-05T10:47:36 | 202,262,849 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,416 | py | roi_extract.py | # !/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import sys
import json
import numpy as np
import cv2
from osgeo import gdal
import transform
import generate_convex_hull as gch
from output import save_tiff
def extract_roi(image_path, xml_file_path, save_dir):
""" ROI提取
可实现从包含多个ROI的.xml文... |
b53c6ddebc571767737cdf157d8712bfaba373c0 | c90b73375ecc1ff0f994ef9668f3df83bbd1a0f6 | /images/apps.py | d92ecf20bc5cf4e27b83543b6a4b3c493fafdd35 | [] | no_license | Nipuna-saga/tag-me | f8be2f356cd1dae5819096ff599876dcbd47c951 | f34df3270dd88303303d4f5f19d981a9cfa6811f | refs/heads/main | 2023-08-11T04:45:55.300013 | 2021-09-20T04:02:30 | 2021-09-20T04:02:30 | 408,025,321 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 154 | py | apps.py | from django.apps import AppConfig
class ImagesConfig(AppConfig):
default_auto_field: str = 'django.db.models.BigAutoField'
name: str = 'images'
|
7ea121899e13b4e2512d0a1bde0f293eeeeaaf6e | 137db9edeb25fc25d48a9f182165b027e85405ce | /my_projects/1024Spark/minispark_local/ms_TaskScheduler.py | 00338f2e36143c297e2b43190920eedd63855471 | [] | no_license | tree3205/Projects | c751897fa081a03f56ee15369f6d7e3d481b1459 | 951181b3e367a1e21df3a718bbadfc6fc42d05fb | refs/heads/master | 2016-09-10T21:47:13.445366 | 2015-07-07T00:14:18 | 2015-07-07T00:14:18 | 38,652,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,176 | py | ms_TaskScheduler.py | import zerorpc
import gevent
import time
from gevent.queue import Queue
import subprocess
import socket
'''
Task Related
'''
auto = True
class TaskScheduler():
def __init__(self, sc=None):
self.sc = sc
self.dagScheduler = None
self.activeWorkers = set()
self.availableWorkers = ... |
99109f256abc921310d4d5264d37b9a0e94ca0bc | ca6794891980462e322a7a24bb750a876ac31642 | /python/Oops/Inventory/InventoryPulses.py | 16a99d51680264c1e9ded3d9a4952feb88b0b518 | [] | no_license | addyp1911/Python-week-1-2-3 | 20d3867164c3e72052f9d3b3c84887bf03e78eab | 4e734768607c1a2a3a0cb3abfb24ea5eceb2f908 | refs/heads/master | 2020-07-05T18:59:25.245564 | 2019-10-11T17:55:58 | 2019-10-11T17:55:58 | 202,738,770 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 581 | py | InventoryPulses.py | # a.Desc :Create a JSON file having Inventory Details for Rice, Pulses and Wheats
# with properties name, weight, price per kg.
# b. Use Library : Java JSON Library , For IOS JSON Library use
# NSJSONSerialization for parsing the JSON .
# c. I/P > read in JSON File
# d. Logic > Get JSON Object in Java or NSDictionary... |
ed1d129e3342b80b32a6fb27c45f28782ed50e77 | 3eb9553a4ebdba77d274de529107d640d0a114cd | /HardCode/scripts/rejection/rejected.py | 368e18d09f106560aa5e229e5eeb0d299b4ae842 | [] | no_license | Anandesh-Sharma/Ananlysis-Node | 6ad1b1f76b3899303febb617e9c939ea01e1b75b | 984e96ca4a693821d87522a480ded311ed34bcd4 | refs/heads/development | 2023-06-10T07:52:07.331920 | 2020-06-16T10:32:50 | 2020-06-16T10:32:50 | 272,643,068 | 0 | 0 | null | 2023-05-27T16:03:35 | 2020-06-16T07:45:26 | Python | UTF-8 | Python | false | false | 4,125 | py | rejected.py | from HardCode.scripts.rejection.preprocessing import *
from HardCode.scripts.rejection.list_of_headers import headers
from HardCode.scripts.Util import conn
from datetime import datetime
import pandas as pd
def check_rejection(user_id):
df_approved, df_rejected = get_data(user_id)
status = True
... |
17017bd7c73fc920e8b3ddbfa1906fc84f3b55d1 | abec35c2d3e812e88b1a7dbe0faadbaf08976e63 | /test.py | a57b33cc85c345684378125070c43e84b86197c6 | [] | no_license | MaxTeicheira/Spotify-Alarm | 6d0f26b8f2dce17998dbf7477f8658a0ab5a8a7e | dc75d423c91f29b5e4ea63c35f693987f4549062 | refs/heads/master | 2020-04-27T02:02:25.040329 | 2012-12-11T04:45:34 | 2012-12-11T04:45:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | test.py | from alarm import format
times = ['6:30', '6:30am', '06:30', '6:30pm',
'12:40', '12:40am', '12:40pm', '13:30']
for t in times:
print t
print format(t)
|
56a3633871d255c1078b35d43b32b92cdd020f12 | bec5bd624607e1a50dbe470ac0c09eb9eb879a11 | /execo-nxc/main.py | 3db8238468f01be0b05b73bd9e4035623c661a2f | [] | no_license | GuilloteauQ/nix-survival-guide | fe3a3abcd2509a5ce02c9d506609585a62d3b55c | 9754f23f6c8dcebfdd63baba19e3ff7376492936 | refs/heads/main | 2023-08-12T06:48:27.141222 | 2021-10-12T12:14:35 | 2021-10-12T12:14:35 | 329,345,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 435 | py | main.py | from engine_nxc import NXCEngine
from driver import Machine, Nodes
def main():
e = NXCEngine()
e.run()
e.plop = "plop"
print(e.plop)
machine_foo = Machine("foo")
machine_bar = Machine("bar")
machines = {
"foo" : machine_foo,
"bar" : machine_bar
}
e.nodes = Nodes... |
d1416d3e90bf0554116218f1c64f301c7e56a370 | 3816578c9ae728e612f5b4714b434a9677c8e725 | /oop/lab4/6.py | b35196b49f51910335baa47b7d8df680cfaaeb13 | [] | no_license | Nyuhnyash/lab | 437eed0a0545f639137e464844b0d15a596c4267 | 4a2a47f16d74039fe8785c2b5701d139b6cb75b9 | refs/heads/master | 2023-05-26T02:03:26.279693 | 2023-05-12T23:13:04 | 2023-05-12T23:13:04 | 153,673,409 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 134 | py | 6.py | from random import randrange
from numpy import sign
nums = [randrange(-2, 12 + 1) for _ in range(20)]
nums.sort(key=sign)
print(nums) |
cd45d4f6b4705211c862908dfdc2256cf5380237 | f47ad60f32a6cb1d160798192fe36873c634b8e2 | /2016/day3/day3py/day3.py | cffa383a193543b72fcac3adcad237dedf938b49 | [] | no_license | smkell/adventofcode | ef829c6a38eabfc8f580207fa335eb3e744b5cd4 | 87eeee3cf644fec39675b7d989b2398e15cb07cb | refs/heads/master | 2021-01-10T03:33:09.694733 | 2017-12-23T07:51:02 | 2017-12-23T07:51:02 | 47,291,879 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,455 | py | day3.py | """Python Solution of Day 3 of the `Advent of Code <http://adventofcode.com/2016/day/3>`
"""
import sys
def valid_triangle(sides):
"""Return true if the given sides specify a valid triangle."""
return ((sides[0] + sides[1] > sides[2]) and
(sides[1] + sides[2] > sides[0]) and
(sides[0] ... |
0087da1b439ec6f0347d0faa717079dafa96f4c5 | ba6d6f9cbcda43ea19a5050127c36f9049f5b8c6 | /tabint/.ipynb_checkpoints/learner-checkpoint.py | cb5fd7f3d453d0226844b2f9aefa8d8fed26bd27 | [
"MIT"
] | permissive | KienVu2368/tabint | 5243abd397153e062c74274f3e6ab33812c96ed0 | 47752c367eefb42bf52876c30e9e9e6085029465 | refs/heads/master | 2021-06-10T12:54:44.996970 | 2020-12-31T10:42:43 | 2020-12-31T10:42:43 | 147,835,011 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,443 | py | learner-checkpoint.py | import pandas as pd
import numpy as np
from .visual import *
from .utils import *
import lightgbm as lgb
import pickle
from sklearn import tree
from sklearn.externals import joblib
from sklearn.ensemble import *
from sklearn import metrics
from sklearn.metrics import *
class BaseLeaner:
def __init__(self, md):
... |
00639175980e58141592514ef8f93929c91a0634 | 0c3f4769e91bf7bea8f9ce74a6dd11e092638bc4 | /migrations/versions/5e1d2cb02f95_updating_column_names.py | f3843302043dbc4ef85793c8955e4371f844ef5d | [
"MIT"
] | permissive | ourresearch/journalsdb | 392ea36282b17154289f1845628cc4706d3c59e9 | 718b118b8e97da9a07f89c2cd2bae207a9217b66 | refs/heads/main | 2022-10-29T10:05:59.410041 | 2022-10-26T18:31:21 | 2022-10-26T18:31:21 | 331,048,946 | 9 | 0 | null | 2021-04-03T16:34:12 | 2021-01-19T16:56:22 | Python | UTF-8 | Python | false | false | 1,805 | py | 5e1d2cb02f95_updating_column_names.py | """updating column names
Revision ID: 5e1d2cb02f95
Revises: 8bca1e6fa760
Create Date: 2021-04-15 22:52:12.791044
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "5e1d2cb02f95"
down_revision = "8bca1e6fa760"
branch_label... |
cf42425fe9aacfdfeb3b8264dfaa414ea8603e46 | 2ae0b8d95d439ccfd55ea7933ad4a2994ad0f6c5 | /tools/mo/openvino/tools/mo/ops/resize_factor_utils.py | 5d3f998255a5b4f8d1f72676e5115e3d2e776b61 | [
"Apache-2.0"
] | permissive | openvinotoolkit/openvino | 38ea745a247887a4e14580dbc9fc68005e2149f9 | e4bed7a31c9f00d8afbfcabee3f64f55496ae56a | refs/heads/master | 2023-08-18T03:47:44.572979 | 2023-08-17T21:24:59 | 2023-08-17T21:24:59 | 153,097,643 | 3,953 | 1,492 | Apache-2.0 | 2023-09-14T21:42:24 | 2018-10-15T10:54:40 | C++ | UTF-8 | Python | false | false | 909 | py | resize_factor_utils.py | # Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import logging as log
def factor_update(factor: float, real_factor: list, in_shape: list, out_shape: list, name: str):
""" Updates factor value for layers related to image resizing such as Resample and Interp. """
if factor is ... |
1dc41dd563c3629d71aeb1554f1ae386c12f7b52 | eeb944792660a37afc0568453beae2691a95a2e1 | /Human_Rights_Committee.py | f88f992a5c0c39512247138ccb957249e5979fad | [] | no_license | woodpjames/web-scraper | 2a2ea74b77154ffc1c656b498007c35d729b5538 | f7d0e08357793d704329c22da921b5ca2a843229 | refs/heads/master | 2022-01-14T13:22:20.579971 | 2019-04-29T18:25:32 | 2019-04-29T18:25:32 | 169,193,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,292 | py | Human_Rights_Committee.py | import requests
from bs4 import BeautifulSoup
from toolkit import Toolkit
# HRDs in the News
fileLocation = '.\\Human_Rights_Committee\\Annual_Reports\\'
nameQualifier = 'HRC_Annual_Reports'
pageNumber = 0
bull = True
listofTitles = []
listofDates = []
listofHREFS = []
while(bull):
linkRequest = requests.get('http... |
2ff4ddb365a82933bfa07cb47725783bd2ebe564 | a8f2e22ff98667489d342822b4446fe80b6ee668 | /src/python/nnf/description.py | 2ac122c342ca4892fb3ba60c2157dd03735266b2 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | zhengly123/nnfusion | 88778b2d361f11710962aea52373692a23d47a8b | 9fd94ae417a0a1c4530cdc01826ed119e753dd73 | refs/heads/master | 2023-04-13T18:57:02.700969 | 2021-04-06T04:17:36 | 2021-04-06T04:17:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,731 | py | description.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import torch
class IODescription(object):
""" A tensor description for PyTorch model input/output.
Attributes:
name: A string representing tensor name.
shape: A sequence of ints representing tensor shape.
dtype:... |
3e474b70ee16fe323911024202f1a88a6d403db0 | 32f2c38debe310470853a8aac7bb0f2c45315543 | /TextToSpeechUsingPython.py | ab49aa60572f70508520ed91c385d71373f61bf1 | [] | no_license | collinskibetkenduiwa/TextToSpeechUsingPython | 8b90d3dc7d3ba4740acf24484fbd04eaa3331b3e | 5f46c919ad5e3a34d48beae947c628957c7bc47f | refs/heads/master | 2023-03-22T09:32:42.404078 | 2021-03-09T05:22:49 | 2021-03-09T05:22:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | TextToSpeechUsingPython.py | #install gtts using pip
from gtts import gTTS
import os
MyText="Text To Speech Using Python"
#opening a file
fh= open("Texttest.txt",'r')
my_text=fh.read().replace('/n',' ')
language='en'
output=gTTS(text=MyText,lang=language,slow=False)
output.save("Output.mp3")
fh.close()
os.system("start output.mp3")
|
b3a02a22a38d28ea503916fab6b2c6214e7fae2d | 7019633b270f534fd25ed757b5d19836c926594e | /backup.py | 17e2f04082349dfb87b4a5ab1c4054d5dc0348e1 | [] | no_license | sudhirshakya/dbbackup | b1d9fb22db9bf4012dc5e8780e9b5f7ba604cb02 | da0055b04aa18f70638297501b36cb74106e7472 | refs/heads/master | 2021-03-12T23:42:45.072846 | 2015-06-15T11:40:05 | 2015-06-15T11:40:05 | 37,456,251 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,284 | py | backup.py | #!/usr/bin/python2.7
from config import conf
from datetime import datetime
import subprocess
import glob
import os
def filepath(dbname):
"""Returns the name of the file for a given database and type of dump. """
time = datetime.now()
filename = dbname + '_' + time.strftime('%Y%m%d%H%M%S_%W') + '.sql.gz'... |
cd7222e3073aa547d479e21fffca6454e15f5c64 | 56ba14e240574dd123cad8e831273db5b7bcbc6b | /unit-testing/test_algorithms_and_data_structures/test_smallest_difference.py | cc44bf4eac625a83a5663b9d3691c97f335e41eb | [
"MIT"
] | permissive | araschermer/python-code | 4b7971b3e6c6cbddf908e3423f5382f80b2f370d | e4f30601779f423476659d5b0b5f5c9df71718f7 | refs/heads/main | 2023-04-23T17:16:19.578997 | 2021-05-18T15:41:31 | 2021-05-18T15:41:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,308 | py | test_smallest_difference.py | from unittest import TestCase
from algorithms_and_data_structures.arrays.smallest_difference import smallest_difference
class TestSmallestDifference(TestCase):
def test_smallest_difference(self):
self.assertEqual(smallest_difference([-1, 5, 10, 30, 28, 2], [27, 122, 160, 13, 17]), [28, 27])
self.a... |
089fb50cf8c2f063bf355e29aea1f73f59c40592 | 8885e05fab453cd3d3039c1b447642d1cd8b8e94 | /bilgi_sistemi/urls.py | 295e4196e270c0273cd2c2389c2605fd03e32605 | [] | no_license | canerturkaslan/bilgi_sistemi | d1ef34a719c7caf66371e4461529f6fc589ceb6e | 84f59c09cc13e4a4e32db894c55df59e2ac4daa8 | refs/heads/develop | 2022-07-30T18:33:12.200161 | 2020-02-26T00:25:57 | 2020-02-26T00:25:57 | 191,894,970 | 2 | 0 | null | 2022-07-06T20:10:31 | 2019-06-14T07:17:02 | Python | UTF-8 | Python | false | false | 362 | py | urls.py | from django.urls import path, include
from ogrenci.views import views
from django.conf.urls import url,re_path
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^$', views.home_page, name='home'),
path('add', views.add_not_page, name='add'),
re_path('api/(?P<versi... |
127c6405bc40a9c7e6e2fd541e256d73c6040e26 | 4311666c309150d36666c689b397bbb4a34c477f | /Server/bin/Worker.py | ac5eef93414acf0d5f8cd87cc61e92dff5110688 | [
"MIT"
] | permissive | danfr/RemoteTV | 321217e8bff405f6be37b175bec80c2c95ce346d | e25747fdae8505a7ef98b9505476b329aa3ee012 | refs/heads/master | 2021-07-12T05:53:41.378062 | 2017-10-16T19:22:21 | 2017-10-16T19:22:21 | 104,492,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,826 | py | Worker.py | import os
import sys
from pathlib import Path
from subprocess import Popen, PIPE
from threading import Thread
from time import sleep
from bin.Setup import Setup
from bin.Utils import Utils, Singleton
@Singleton
class Worker:
current_process = None
tmp_files = []
def manage_command(self, form):
t... |
94398d1d93c09ed9268c75e9e3b4ca470ee2c749 | f48962509ac15d310bc1b3d18b95598ba808bddc | /c3po/drip.py | 480a9983644909b9eeb387411894b7e1818ad888 | [] | no_license | cbeach/The-Cat | 15ee4e2ccccae9d7c5abc3c1a186aceea3b74b29 | 8d66918460180f8e84d1112d33d7164c4500d2be | refs/heads/master | 2016-09-05T23:21:43.108920 | 2011-10-01T02:06:40 | 2011-10-01T02:06:40 | 1,156,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,107 | py | drip.py | import commands
import curses
import time
import re
class SnotDrip:
window = None
def __init__ (self):
pass
def initWindow (self, cursesWindow):
self.window = cursesWindow
def processFrame(self):
ticketNumbers = self.lastNTickets(10)
ticketNumbers.sort(reverse=True)... |
936f95efd18f428be39d0ab0ba501f0029fecc08 | d4107e5b1afcc52e63278462923e8010f8edbdcd | /fractalsTest.py | 0deebc9a00eb5e68c7565a5e5ab27a0fe84b3ffa | [] | no_license | toddcalnan/FractalCompression | 9dcabb0816a8c19863344cb0bab5588ffa9498d7 | 892a082e1baa1db7c6339784b26891e36074bc2d | refs/heads/master | 2020-09-10T14:13:56.610652 | 2019-11-14T14:06:55 | 2019-11-14T14:06:55 | 221,710,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,815 | py | fractalsTest.py | import numpy as np
from math import *
import fractals
import unittest
from collections import OrderedDict
from scipy import misc
import Image
class TestFractalFunctions(unittest.TestCase):
def setUp(self):
self.muWhite = np.matrix(np.asarray(Image.open('whiteTest.png').convert("L")))
self.muBlack ... |
af93768bfacb2ab6c8af70484ae29a27bc4bff1a | 1de35a4f86dec03cccf6448df7926ea8b50fcd3c | /string/ValidParentheses.py | a5bd4cf3ef0092a450f6e947e96618de878131c7 | [] | no_license | impradeeparya/python-getting-started | 4fdd6005d4eecf442b5a2939c08a9a73237b47c3 | 73353e6fcfb86f7bb993e967ee58cc4011671024 | refs/heads/master | 2023-06-23T13:50:45.914679 | 2021-07-26T17:49:11 | 2021-07-26T17:49:11 | 329,905,508 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 646 | py | ValidParentheses.py | class Solution(object):
def isValid(self, s):
is_valid = True
stack = []
start_parenthesis = '{[('
parentheses_map = {']': '[', '}': '{', ')': '('}
for parenthesis in s:
if parenthesis in start_parenthesis:
stack.append(parenthesis)
eli... |