blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f9223c6f436ea5266d96716ea00fab8e54ef1232 | f61aa4d5791fc858e52db956f447cfd0af5182cf | /for_loop_with_range.py | d3a11bce07fa0ab64713d62c00d4dc30278ae539 | [] | no_license | AshutoshPanwar/Python_udemy_course | 70abda4418c4532dd886a2b98c0bfb0bc8fbc138 | 7b4698f47a9a80b4cbe07e2334ccc6bc1427118c | refs/heads/master | 2023-04-19T00:02:48.129265 | 2021-05-05T10:23:52 | 2021-05-05T10:23:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 229 | py | x = range(5)
print(x)
for i in x:
print(i)
x = range(3,9)
print(x)
for i in x:
print(i)
x = range(0,10,2)
print(x)
for i in x:
print(i)
x = range(10,0,-1)
print(x)
for i in x:
print(i) | [
"[email protected]"
] | |
62057c8eb956315f5f52fa00e9a3237b9e78aa7e | c1faf35b2fe1beda6c839031465195ea58b4c495 | /panelserverextension.py | eae784198ae449200859acbf4742f46ee152c279 | [] | no_license | makwingchi/philly-route-finder | ff9f6001a39a7d838ff143ee5445cc848f456205 | c807c76290772f4b31bd0cdaab7a1ab6e505d8e7 | refs/heads/master | 2020-05-22T10:19:23.003297 | 2019-07-14T15:25:46 | 2019-07-14T15:25:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 206 | py | from subprocess import Popen
def load_jupyter_server_extension(nbapp):
"""serve the app.ipynb directory with bokeh server"""
Popen(["panel", "serve", "app.ipynb", "--allow-websocket-origin=*"]) | [
"[email protected]"
] | |
90d5f61f2f9b83db77223e3d0283d7bd46995393 | 741fdf35f1e890f9e4b2c878fe4febf5ca49ca2c | /venv/lib/python3.7/__future__.py | 13fc49f811ca3a58d28b3f073dd5c98abb0ed602 | [] | no_license | kkhuong/provablecard-backend | 39f1430060aa656e178ce86bca92912b0d4ec6ca | 45d91571ba1091a9c9a62ad2cc4ee9ac56e5fb77 | refs/heads/main | 2023-08-07T03:44:31.124974 | 2021-09-22T23:03:23 | 2021-09-22T23:03:23 | 403,407,838 | 0 | 0 | null | 2021-09-22T23:03:24 | 2021-09-05T20:36:14 | Python | UTF-8 | Python | false | false | 52 | py | /Users/kkhuong/anaconda3/lib/python3.7/__future__.py | [
"[email protected]"
] | |
30a24a821f8d90d74d6bc66e4f16cf66c480df7d | 2e368bbce5f867db9046f45130bbbae06e3fbe1d | /SPOJ/AGGRCOW.py | 44da59577a4cdeef35588a178d747d50f505ec7f | [] | no_license | Andresrodart/Hobbies | 2b66c5adc8054b5f8e4c58129f49b0af420383ec | f1d29f3d30104d41aa80b7cea0aae7730a2cf6d8 | refs/heads/master | 2022-10-24T18:33:31.707102 | 2022-10-22T00:10:15 | 2022-10-22T00:10:15 | 172,858,524 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 661 | py | def binary(lis, N, minElement, maxElement):
mid = int((minElement + maxElement)/2)
aux = False
if minElement > maxElement or mid == 0: return 0
for i in range(N - 1):
if mid <= lis[i] - lis[i - 1] - 1: aux = True
if aux == True: return min(mid, binary(lis, N, minElement, mid - 1))
else: ... | [
"[email protected]"
] | |
502a997a737c69b83cae42436b5cfb34b54b79a6 | c3a3559c13ae03c608e1a499296e6591b30e2a65 | /apis/admin.py | 3b090b7af1014def36b7378b2123e21d0380ea6a | [] | no_license | shohansk/powerup | 6a7f9f90672777bf8c358184880b7b1e666cbd1f | dbb935f2ca7a933061abb941c241c3e96746b6d3 | refs/heads/master | 2023-08-05T13:07:37.676846 | 2021-10-05T20:33:49 | 2021-10-05T20:33:49 | 412,752,830 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 265 | py | from django.contrib import admin
from .models import *
# Register your models here.
#admin.site.register(Article)
@admin.register(Article)
class ArticleModel(admin.ModelAdmin):
list_filter=('tittle','description')
list_display=('tittle','description')
| [
"[email protected]"
] | |
5e41d186eacaeca5c998b2f0448d52b60e251c6b | 0e563cc19a6d7817c353c4d1903ae2ee37ccaa72 | /Functional_Programming.py | 9db92732b5fda6c74ce338fbd2ba8261259da556 | [] | no_license | AaliyanK/AdvancedPython- | fa25efcc4d1459b470afe804d51af7eed6ee56a8 | 0e7f4e2de35f85ca6376d651df085e29ae059aa1 | refs/heads/master | 2021-03-29T01:55:45.975840 | 2020-03-17T08:18:59 | 2020-03-17T08:18:59 | 247,913,651 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,854 | py | # Functional programming - packaging of code like OOP - seperate data/functions
# PURE FUNCTION - input a list and function does something to result in a different output
# given the same input, pure functions should always return the same output
# should not produce any side effects - changes in variables, changing th... | [
"[email protected]"
] | |
d2d4b145a119464517178bf68e6c701759415581 | b64dda470d8738476cc9e12d681887d0fa43e483 | /IPL/urls.py | 86856c93c0578d45348b6b73a448c32c497368dd | [] | no_license | Sky-Akash001/IPL2 | e03be810582958270f32212a6756d2a836e21fdb | 80ff8aeb2c36617fc6819e4194fa1b682d1b3073 | refs/heads/master | 2023-03-21T00:21:51.927475 | 2021-03-15T11:59:44 | 2021-03-15T11:59:44 | 347,951,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 916 | py | """IPL URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | [
"[email protected]"
] | |
98c3f17ac4c25ff7ff6cef9610b9bc3f69064b48 | 9e87c4502713bfd4dfb113c6bb48a752597a0431 | /gss/bin/modes/enhance.py | edd711f6ff1f8b632ea746f1b3fe7304b948a092 | [
"MIT"
] | permissive | desh2608/gss | ef9eabea233bd436da5ea79bfc51ba2f7562c2e1 | 9594ccb0efc72ad591504bfe195c82aeafd397b8 | refs/heads/master | 2023-08-20T04:50:10.913415 | 2023-08-13T17:05:26 | 2023-08-13T17:05:26 | 454,553,727 | 62 | 7 | MIT | 2023-07-20T13:46:15 | 2022-02-01T21:16:15 | Python | UTF-8 | Python | false | false | 10,459 | py | import functools
import logging
import time
from pathlib import Path
import click
from lhotse import Recording, SupervisionSet, load_manifest_lazy
from lhotse.audio import set_audio_duration_mismatch_tolerance
from lhotse.cut import CutSet
from lhotse.utils import fastcopy
from gss.bin.modes.cli_base import cli
from ... | [
"[email protected]"
] | |
9f6ac6ecefb20871f98905fe6225b28a48eaf51d | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /9szPm9Mg5D2vJyTvf_14.py | c4b1eb7103a2e128742d7e447be9653582eade63 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 681 | py | """
Write a function that takes three arguments `(x, y, z)` and returns a list
containing `x` sublists (e.g. `[[], [], []]`), each containing `y` number of
item `z`.
* `x` Number of sublists contained within the main list.
* `y` Number of items contained within each sublist.
* `z` Item contained within each s... | [
"[email protected]"
] | |
dd9fe308a2e6dd027278533f1be405f235583281 | 207ef888d9ba6f73378756c0c0b1f22864b15c93 | /myapp10.py | 420f42a67946444cbfdacc2a5aae3c76e33e35ec | [] | no_license | ochim/python-lessons | 935ef6977e8c12c4babb04aa4b76106a02ab337a | 1eb1bd9fd9eb84a1fb746776405e7520da1b7f47 | refs/heads/master | 2021-01-20T02:37:43.973892 | 2017-04-26T03:21:10 | 2017-04-26T03:21:10 | 89,432,010 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 194 | py | # method
# def say_hi():
def say_hi(name, age = 20):
# print("Hi")
print ("hi {0} ({1})".format(name, age))
say_hi('tom',23)
say_hi("bob",25)
say_hi("jobs")
say_hi(age=18, name="rick")
| [
"[email protected]"
] | |
d2bec8330e7194b82322663dff6a7e4aebb23fa0 | a8ec4d66072edaa8ab090c2956a989aa8429d6b6 | /Q2/rent_cawler/rent_crawler/crawlers.py | 7abc6bbb3c049bc10db7e1a100458e4c959448a3 | [] | no_license | sileverfall/takeHomeExam_ca | b57cc399c4e0945c34739d2b7fd52f3c728f0f15 | c34d5b810720c5788efd5f42c397df17b70e05cf | refs/heads/master | 2021-04-11T04:45:33.724861 | 2020-03-28T16:05:52 | 2020-03-28T16:05:52 | 248,993,155 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,624 | py | from rent_crawler.config.headers import user_agent_list
from rent_crawler.config.region_map import region_map
from bs4 import BeautifulSoup as bs
from lxml import etree
from pprint import pprint
from urllib.parse import urlencode
import math
import json
import os
import pandas as pd
import re
import requests
import tim... | [
"[email protected]"
] | |
8f9cbe32837705b4ef9ab8d7ce0e86116f300f55 | 028b90aba19673183e1433cf44d8de631bf915e3 | /Python_Tutorials/for_loop.py | 99aabd643f7ed1c92b3c168c0ccbd3130e139dc5 | [] | no_license | vivekgupta8983/python_tut | 5388948964ef6419fb0fea7f734c6b180d72e7a0 | a6471c193f46c3ed905315012ef0074f41cc2d71 | refs/heads/master | 2020-06-29T06:08:12.883359 | 2019-08-09T12:03:17 | 2019-08-09T12:03:17 | 200,458,697 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 487 | py | """
For loop example for Python
"""
# string for loop
my_string = 'abcabc'
for c in my_string:
if c == 'a':
print('A', end=' ')
else:
print(c, end=' ')
print()
# List for loops
cars = ['bmw', 'benz', 'honda']
for car in cars:
print(car)
nums = [1, 2, 3]
for n in nums:
print(n * 10)
#... | [
"[email protected]"
] | |
65d52f74844248efbaf7b804d72e1910b77afe4f | 9716db44524889e45b7c47cb9808e67a3bc68fcc | /TCPControl.py | a791ed568bfea8e6185fa3aa72a8e9f21b3dcc24 | [] | no_license | UDneuroDrive/Hardware-Program | 5323fd3821b68a290bf3616d802b9fc9ad898b18 | 187111f75bb5e6205f06224a5830ed3977162378 | refs/heads/master | 2020-09-24T10:18:49.443652 | 2019-12-03T23:56:11 | 2019-12-03T23:56:11 | 225,738,495 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,078 | py | #run this file from terminal
#must be in the same folder on the Pi as servomotor4.py
import motor
from socket import *
import time
from time import ctime
import RPi.GPIO as GPIO
import Adafruit_PCA9685
#Initializing the I2C communication with servo hat
pwm = Adafruit_PCA9685.PCA9685()
pwm.set_pwm_freq(50)
#Run initia... | [
"[email protected]"
] | |
a8694b72dc9f4ac269b718d8c743574a18cfc288 | 1fc45a47f0e540941c87b04616f3b4019da9f9a0 | /tests/sentry/api/endpoints/test_commit_filechange.py | 49eefdcd009d8d4020c56be8b1609185bc95f982 | [
"BSD-2-Clause"
] | permissive | seukjung/sentry-8.15.0 | febc11864a74a68ddb97b146cc1d2438ef019241 | fd3cab65c64fcbc32817885fa44df65534844793 | refs/heads/master | 2022-10-28T06:39:17.063333 | 2018-01-17T12:31:55 | 2018-01-17T12:31:55 | 117,833,103 | 0 | 0 | BSD-3-Clause | 2022-10-05T18:09:54 | 2018-01-17T12:28:13 | Python | UTF-8 | Python | false | false | 2,225 | py | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.models import Commit, CommitFileChange, Release, ReleaseCommit, Repository
from sentry.testutils import APITestCase
class CommitFileChangeTest(APITestCase):
def test_simple(self):
project = self.create_projec... | [
"[email protected]"
] | |
a29b7038e5dac455d40ad782b66da3e5b49c9846 | ae28569fe6804d20de3856cdc9006e98f2db6496 | /Item.py | adce20be72cf61cf7d542ed01c0dda3a61b7ae1f | [] | no_license | Eredost/Save-Macgyver | d75131951d692deb1843622511500285d99d9190 | ddf49a332bfd68c6bba5edc1f615a212b89dcfac | refs/heads/master | 2021-09-06T07:10:15.868332 | 2018-02-03T16:05:09 | 2018-02-03T16:05:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,812 | py | #-*-coding:UTF-8 -*-
"""This module load items, place randomly on
the window and check the player position"""
import random
class Item:
"""This class initialize a random place
for items and initialize it on pygame
window, create a inventory and fills it
according to the position of the character"""
... | [
"[email protected]"
] | |
e8519a97fb7a10b34702f8bc053774cc1ae0a89f | 6cc2b7d5b30ac94103770412d4647fa5d80edac5 | /bot.py | 9cb2b6cad121be952d80edcb6d518cf8443dc0a8 | [] | no_license | shers003/firstRedditbot | 0eab61c5ee068dec9007331c71c82d833eabd821 | d2cf521a0475468720a0ec74667421951017a934 | refs/heads/master | 2023-02-17T03:00:52.973903 | 2021-01-18T14:51:13 | 2021-01-18T14:51:13 | 326,768,508 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,640 | py | #My first attempt at making a reddit bot
#04-01-2021
#I'm well excited
#praw
import praw as pw
#dotenv
from dotenv import load_dotenv
import os
load_dotenv()
#sub class of prasws Reddit class
class Bot(pw.Reddit):
''' A reddit bot class '''
####### Bot Properties #######
##########################... | [
"[email protected]"
] | |
d37b7814d33e64ec6efd273404e647d346e57d42 | 40c28ca3a8efd25f5ce5a0bfa549a8b1ba6bc958 | /pelion_test_lib/tools/external_conn.py | b6eda62d9022f51d777eb8ed247fb0df07bbade6 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | teetak01/pelion-e2e-python-test-library | fc231ed7e72bf1c0cc8e7d01d3a728a6c48d53a2 | 5eddd591847b5363e9f6364ac40974715906fe0c | refs/heads/master | 2022-12-10T03:47:23.255125 | 2020-08-20T11:40:32 | 2020-08-20T11:40:32 | 290,125,183 | 0 | 0 | Apache-2.0 | 2020-08-25T05:48:03 | 2020-08-25T05:48:03 | null | UTF-8 | Python | false | false | 4,946 | py | # pylint: disable=broad-except
"""
Copyright 2019-2020 ARM Limited
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 applicable law or ... | [
"[email protected]"
] | |
d5cd7cfe45515f1a0899cf0344254ae70d9a69c6 | 8ef8e6818c977c26d937d09b46be0d748022ea09 | /cv/3d_detection/pointnet2/pytorch/mmdetection3d/mmdet/version.py | 0e03a9d35749aef5d396e532d5ab8c5a0bae223f | [
"Apache-2.0"
] | permissive | Deep-Spark/DeepSparkHub | eb5996607e63ccd2c706789f64b3cc0070e7f8ef | 9d643e88946fc4a24f2d4d073c08b05ea693f4c5 | refs/heads/master | 2023-09-01T11:26:49.648759 | 2023-08-25T01:50:18 | 2023-08-25T01:50:18 | 534,133,249 | 7 | 6 | Apache-2.0 | 2023-03-28T02:54:59 | 2022-09-08T09:07:01 | Python | UTF-8 | Python | false | false | 529 | py | # Copyright (c) OpenMMLab. All rights reserved.
__version__ = '2.24.0'
short_version = __version__
def parse_version_info(version_str):
version_info = []
for x in version_str.split('.'):
if x.isdigit():
version_info.append(int(x))
elif x.find('rc') != -1:
patch_version... | [
"[email protected]"
] | |
e899adf45b545c621a8fdd0259a32756768af161 | de311a98efad18542b5ff87bd962957404eb3635 | /blog/admin.py | 1d264e7bb3d2dc9583f82e09eea5000845957f93 | [] | no_license | aggressxve/my-first-blog | 6b8a5a49ed18b36bafeee74436350fce5dbf94ac | 4ee010ef5c6715bd3196cfb2e9eec03216f41722 | refs/heads/master | 2022-11-05T16:22:50.939627 | 2020-05-28T21:26:23 | 2020-05-28T21:26:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 143 | py | from django.contrib import admin
from .models import Post
admin.site.register(Post) #Hace posible ver los modelos Post en la página del admin | [
"[email protected]"
] | |
63e3fa0e7d86c5133e69ba329a533e4edfdc34c1 | 0d4ec25fb2819de88a801452f176500ccc269724 | /sub_two_binaries.py | d4f6682fa6bf8cad577240ddabce0a9eaa7818a1 | [] | no_license | zopepy/leetcode | 7f4213764a6a079f58402892bd0ede0514e06fcf | 3bfee704adb1d94efc8e531b732cf06c4f8aef0f | refs/heads/master | 2022-01-09T16:13:09.399620 | 2019-05-29T20:00:11 | 2019-05-29T20:00:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | class Solution:
def addBinary(self, a, b):
"""
:type a: str
:type b: str
:rtype: str
"""
s = ""
a,b = a[::-1], b[::-1]
la,lb = len(a), len(b)
l = max(la, lb)
i = 0
carry = 0
while i<l or carry==1:
b1 = int(a[i] ... | [
"[email protected]"
] | |
93c12e2a331418525af23fd8dcef829c87bdcb39 | 508ebe7c64faa6ac4498e5d4e7dbd38c405e908e | /d03/DefDemo2.py | 44f2b3bc6782a6dd557510aa5a78c11c03b63638 | [] | no_license | YuukiHi7/Python0709 | 34acdd3190c4c9862b596de42bd9bc235c4f18e5 | 68284f9140ad198ad8cad933dfa5d05e53a9ee34 | refs/heads/master | 2022-11-24T12:58:37.132550 | 2020-07-14T14:03:01 | 2020-07-14T14:03:01 | 278,379,789 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 135 | py | def printBMI(h, w):
bmi = w / ((h / 100) ** 2)
print("%.2f" % bmi)
printBMI(170, 60)
printBMI(180, 63)
printBMI(8848, 156000)
| [
"[email protected]"
] | |
cc5695f1470140f25b2cb77800818102059fa4d6 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /kdhgEC2ECXAfoXWQP_1.py | 18cfc39baa91a8ce324e7628429be8a4c0702226 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,119 | py | """
In this challenge, you have to obtain a sentence from the elements of a given
matrix. In the matrix, each word of the sentence follows a columnar order from
the top to the bottom, instead of the usual left-to-right order: it's time for
**transposition**!
Given a matrix `mtx`, implement a function that returns t... | [
"[email protected]"
] | |
7144fa783f63ad2515e8c682849e12400d6df0b0 | 06ff1c8056cf5408e6acd5396d4c2ea4fb50cd92 | /02Fabryka/Students/2019/JarzembinskiBartlomiej/factory_with_class_registration_reflection/food_store.py | bfaa1ab6718a1a0fe0b1b674d581c7eeade619c4 | [] | no_license | kasa4565/DesignPatterns | b654dc8072940634ffcae52d297dc7da5d93c0b2 | 56dfac636b49266aa86f5b61cce0f9fb76a2b859 | refs/heads/master | 2020-08-23T08:10:09.661667 | 2019-08-15T07:54:30 | 2019-08-15T07:54:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 737 | py | from menu.food import Food
from threading import Lock
class FoodStore:
_instances = {}
_threading_lock = Lock()
_registered_products = {}
def __new__(cls):
if type(object.__new__(cls)).__name__ not in cls._instances:
with cls._threading_lock:
if type(object.__new__(cls)).__name__ not in cl... | [
"[email protected]"
] | |
9a996997ae3b80d18109ce7c1d13e7c1ad21d73d | c2de6f699faa6cd79897c57895677d35f28bcea4 | /arena.py | a3955b65b1d853c6ac3dfe3a4f04e10f52793956 | [] | no_license | RippleEcho/Darwin-Bot | 679f43ee3fc2e1fbc53e2e31d37f05d03194816c | 57e9f5c2457a3f39952c3dce47813266ba6efcdf | refs/heads/master | 2022-05-26T19:16:32.694138 | 2020-05-01T16:39:30 | 2020-05-01T16:39:30 | 259,056,334 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,901 | py | from repbot import repbot
from datetime import datetime
import random
import math
class arena:
def __init__(self):
self.A=0
def setup(self,N,M,R,G,F):
if(F):
TS=datetime.now().strftime('%Y-%m-%d')
file=open(TS+" Minds.txt" ,"a+")
#file.write(TS)
#... | [
"[email protected]"
] | |
3da334d08f98f8cf06aa4794ea35ab1bdecc8c8a | 8c8159691382ab8759ec637a97ef107ba898ad4c | /Recursive/removeInvalidParentheses.py | 44953cd000adfcd6e1707c07b5da6c12c0038303 | [] | no_license | windhaunting/Coding_practices | 3c89cddaeb13bfe36eab7ff664d6e16d0e86d46f | 8375988ac391376159438877b6729bb94340106b | refs/heads/master | 2021-02-05T21:40:07.858445 | 2020-02-28T19:25:29 | 2020-02-28T19:25:29 | 243,836,816 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 690 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 16 16:43:09 2018
@author: fubao
"""
#301. Remove Invalid Parentheses
'''
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.
Note: The input string may contain letters other than... | [
"[email protected]"
] | |
367cc3c27826f4a4d5675273b24b2261a1f42cd0 | b0d934c531647353c6be4800f336ad7440f8486e | /homework/workbench/ecoli_vs_salmonella_map/organize.py | 7dce7a771dd43da37675a48e2e921ec78619b0ae | [] | no_license | riemaxi/data | d2a8a43cee7fa3889be0e618064bec24f2ae1286 | d165c6075aaf4857d2787b6aaa35c32e45292575 | refs/heads/master | 2021-01-20T13:56:41.530472 | 2019-03-14T17:09:02 | 2019-03-14T17:09:02 | 90,539,168 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 946 | py | #!/usr/bin/env python3
import dataset as ds
import math
def stdv(mean,n, lst):
return math.sqrt( sum([(float(c)-mean)**2 for c in lst])/(n-1) )
def level(s,c,maxc, stdvc):
return stdvc/(abs(maxc - c) + stdvc)
# Creates the header for the next step: filter
# The header is composed by three values separated by tabs... | [
"[email protected]"
] | |
913bbc59abbd821c216bcbc35c9af61164b9c8fd | f60dceca03f3fdf0ea7d9d5aec97255db282651f | /Raspberry/modules/Classifieur.py | 5895f76033831de6b39f87225042524adcaabada | [] | no_license | Alois41/cat-feeder | 5812144e2e0233f650d7382f9ebdc36ce909e6c4 | 28af5329ade86dff07cc33cbba27dc7e1227e9e1 | refs/heads/master | 2023-02-19T04:55:23.308851 | 2021-01-20T10:01:16 | 2021-01-20T10:01:16 | 331,250,190 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | import torch
import torch.nn as nn
from torchvision import transforms
import ast
model = torch.hub.load('pytorch/vision:v0.6.0', 'mobilenet_v2', pretrained=True)
model.eval()
preprocess = transforms.Compose([
transforms.Resize(256),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normali... | [
"[email protected]"
] | |
40d3da02df59b62aa82d58dea2b9128eec39654b | f4655d85ac03e7f6999e590bdfad81adcc0399b8 | /predicates/dictionaries/tagger/sqlparsing.py | e95c8a72010dae06dac3cdb1245c3b9c601a1270 | [] | no_license | petezh/RR-NLP-Tools | 3ad767de5b56a8ac7a59c7f2e41da8918db98570 | ee7094b5660b3e92e8ff1b114029afe1964642fc | refs/heads/master | 2020-06-06T16:47:59.501188 | 2019-08-29T20:55:39 | 2019-08-29T20:55:39 | 192,795,569 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 904 | py | import sqlite3
con = sqlite3.connect("data.db")
cur = con.cursor()
buildVerbTable("test verbs.csv", "verbs")
buildDataTable("testdata.csv", "data")
def buildVerbTable(in_csv, out_table):
tableBuild="CREATE TABLE IF NOT EXISTS "+out_table+""" (
word VARCHAR(50),
form1 VARCHAR(50),
form2 VARCHAR(50),
form3 VA... | [
"[email protected]"
] | |
c5d4fd9d5264c1d3d95f7b448f79aaa0a7128412 | 756afdbd0edfec18b32d4d842a1263ae6f12fd46 | /create_room.py | ca38a653904bb256c53ad6bd3e0e2de52675b7df | [] | no_license | LoukaOctave/devasc-skills | 93e3dcf0294494fd36453f3fd662a709ceedda67 | 438bbe0f8d53bd2216e7850c1373cdc351742124 | refs/heads/main | 2023-07-15T18:46:23.844782 | 2021-08-19T22:03:45 | 2021-08-19T22:03:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,128 | py | import requests
### Edit these variables
room_name = 'netacad_devasc_skills_LO'
new_member_email = '[email protected]'
###
# Gets access token from file
with open('token') as t:
access_token = t.read()
t.close()
# Created a room
url = 'https://webexapis.com/v1/rooms'
headers = {
'Authorization': 'B... | [
"[email protected]"
] | |
0b4285bff2df5cd19b3e3e2f31c78b854999b8f5 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/65/usersdata/185/34920/submittedfiles/investimento.py | c02de528254c4d919d01652089a4c2aa1ade2813 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 515 | py | # -*- coding: utf-8 -*-
from __future__ import division
i0=float(input('digite o valor do investimesnto:'))
taxa=float(input('digite o valor da taxa:'))
i1=(i0+(i0*taxa))
i2=(i1+(i1*taxa))
i3=(i2+(i2*taxa))
i4=(i3+(i3*taxa))
i5=(i4+(i4*taxa))
i6=(i5+(i5*taxa))
i7=(i6+(i6*taxa))
i8=(i7+(i7*taxa))
i9=(i8+(i8*taxa))
i10=... | [
"[email protected]"
] | |
a3851be4eb6d2054a8720bb7b9d73755c14c0d53 | fceb3c57a882a10fe9c06e3baf8aceb975c66d5a | /EDPwd.py | 1a4de5b07b12227a4455ecf6b4d9e4f97b369950 | [] | no_license | ESSAMAMI/ThefThor-REST-API | d7d0a30ec43b5c10fa54870de9b7c601c77c8187 | 8bde89fcc9ba4561557d1a362ab87e145ab0bb58 | refs/heads/main | 2023-06-05T22:29:28.729796 | 2021-07-03T13:50:45 | 2021-07-03T13:50:45 | 382,623,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,180 | py | from cryptography.fernet import Fernet
import os
import pathlib
class EncryptDecryptPwd():
def __init__(self):
pass
def generate_key(self):
"""
Generates a key and save it into a file
"""
key = Fernet.generate_key()
with open("secret.key", "wb") as ... | [
"[email protected]"
] | |
6017ff5d62258b8bdc613d2deb7b6f19177ac641 | d01fa1b6668c66236405b799e39e529d1492af7c | /{{cookiecutter.project_slug}}/pages/migrations/0016_sitebranding.py | 9068f89e8055a2b76d16b1f85251befee436df7b | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | chrisdev/wagtail-cookiecutter-foundation | 426ffd974aa08ab10e4b0e44d5003476c597f2e4 | e7d56ee01eb5976588129d7bd4d5fc6dab2d794a | refs/heads/master | 2023-08-31T06:05:43.999253 | 2022-03-31T18:44:37 | 2022-03-31T18:44:37 | 33,870,540 | 189 | 72 | MIT | 2023-09-14T03:30:34 | 2015-04-13T13:36:50 | Python | UTF-8 | Python | false | false | 1,105 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-10 14:02
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wagtailimages', '0019_delete_filter'),
('wagtailcor... | [
"[email protected]"
] | |
65b3b7c3f22755d3319a4ba0322bf2bf04e98c87 | bf76559fd0cd55854c39f3fd40aa9eb050905253 | /watchbuy.py | d85f9da1f128e27bf393d81cb948e2d57f3c42cc | [] | no_license | JohnCho92/watchbuyers-companion | 39728452b4a1368499374e0aa478dc4595486e96 | 3bfcca7b50f061fa517e41110b6f5017b1059904 | refs/heads/master | 2020-09-26T07:54:55.807229 | 2019-11-24T22:59:59 | 2019-11-24T22:59:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,901 | py | '''
Watchbuyer's Companion
Author: Jasen Chan
TODO:
- add regular expressions for crown&caliber
- show which marketplace has better prices
- change prices for new, box, papers etc
- OPTIMIZE: this is just a barebones working version of the program; many optimizations can be made on the regexs, and possibly on strin... | [
"[email protected]"
] | |
ed7c268914766a48037a427fadc8a0e0ca235bd8 | 2d568df57271f7db9d9bb7fb95c3f71e3330ff5b | /pygis2/merginShapeFil_gdal.py | 56e72398c50cc2a69bb7b694a0f114b9ef8703af | [] | no_license | lamhydro/pygis | a4f493dc57d94e8a4832d4a060a2dce5c1c8d6df | f7567392bdafbcc0c2a6a4ee6ddd2543e08345a1 | refs/heads/master | 2023-03-14T11:24:25.126186 | 2021-03-01T03:19:16 | 2021-03-01T03:19:16 | 343,274,578 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,131 | py | # Merging shapefiles using GDAL/ORG
# Opening ESRI shapefile. Return the shapefile driver of file and its layer.
def openingShpFile(file):
driver = ogr.GetDriverByName('ESRI Shapefile')
shapefile = driver.Open(file, 0)
if shapefile is None:
print 'Could not open file'
sys.exit(1)
# Opening a... | [
"[email protected]"
] | |
952ab841e5c96cbd7cd5c41fa5d8236831707234 | aabec0a1423de60561955c8a9cf0e78c6c08e405 | /project/views.py | f23b4b9bfbc6650e1f2306fb5bf04e326fbf95de | [] | no_license | BhateB/Project_API | f914d22614403298c85ed30199a33f6f0785d819 | fd3f0c2c1aaf75f4f6e6f155b269e3c33b8a4bd0 | refs/heads/master | 2022-12-10T10:35:13.895400 | 2019-10-17T12:59:46 | 2019-10-17T12:59:46 | 215,604,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,338 | py | from django.db.models import Q, F
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
from rest_framework.authentication import TokenAuthentication
from rest_framework.response import Response
from rest_framework.generics import CreateAPIView, RetrieveUpdateDestroyAPIView
from djang... | [
"[email protected]"
] | |
682e1e44855b34b074466e3e4fd9684b1ef7e368 | 2d165722d96188714421aea64899081d227b88f3 | /husky/build/catkin_generated/stamps/Project/_setup_util.py.stamp | 896fd636cc3780ae3b210b43db0b4b5c4f699bfc | [] | no_license | anoop-ra/final | 80dea439a1848388fe098fa6c3acc26f6ffce05e | e97822b659463efce42cc453b84ad0a54d0f74c5 | refs/heads/master | 2020-03-25T00:32:04.026194 | 2018-08-01T18:09:42 | 2018-08-01T18:09:42 | 143,191,085 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,437 | stamp | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistrib... | [
"[email protected]"
] | |
9d04c029711c160f3fc3d500e9135ec8d10faa34 | 9e5dc6943bd73ef19876eefe6b4ce39722fa1af9 | /tests/test_pytorch2caffes.py | ba4d3a983ab0186822bcffc9855ff80fe08c6359 | [] | no_license | UmboCV/onnx-caffe | a0649cfb1c7d35f7dd772f56baecbff427b98b3e | 74ce1fbeb6a16e098650fe215d2083f01fe48ed2 | refs/heads/dev | 2021-07-06T10:24:38.218506 | 2018-10-23T00:15:00 | 2018-10-23T00:34:53 | 146,048,022 | 7 | 1 | null | 2019-03-26T07:30:00 | 2018-08-24T23:18:10 | Python | UTF-8 | Python | false | false | 1,615 | py | #!/usr/bin/env python
from __future__ import absolute_import
# pytorch -> onnx --> caffe --> (pb2, prototxt) file
import numpy as np
import onnx
import os
import pytest
from common import testset, simple
# ONNX generic
@pytest.fixture(params=['caffe'])
def backend(request):
from onnx_caffe import backend as ca... | [
"[email protected]"
] | |
32443a280de93e0a4e418e0eb590554bbb3f99b0 | 84b70a03236590c962b9f29d639afc34ec31f0b7 | /renduFinal/tests/exemple.py | 636efa20692352c69a05c031df38aaeb527eef8a | [] | no_license | JulienAdrienCeline/tpCompil | 04ded4ad0c7b60dcbf30cd6a08172392f399ad8c | e2eab5b4b43b9ba7ee83ffadc09e492924f8a180 | refs/heads/master | 2020-05-31T05:25:55.722745 | 2015-05-04T10:24:10 | 2015-05-04T10:24:10 | 33,997,722 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 203 | py | a = 3
b = 9
def fac(i,j):
c = 5
d = 12
if(c < 10):
c = 8
print d
print c
def triple(i):
print 3*i
fac(a,b)
if(a < 10):
print a
if(b < 10):
print b
triple(b)
if(a < 5):
print a
print a
| [
"[email protected]"
] | |
e54991386218ddb04789aec57658012036dbfdf2 | 5c0493d7951e58758734c96a9f032d6c4bd81a88 | /toh/hero/migrations/0001_initial.py | 5591d157f6dc649b965305157665c53bdf899e3b | [] | no_license | ihatedebug/swpp2020-django-practice | 0946fb995f3732483ce6ae70de8131692714191f | 3c2a3bbd8aff7d1158e790591129f4547f1d9d74 | refs/heads/main | 2022-12-24T15:31:21.711764 | 2020-10-15T14:48:50 | 2020-10-15T14:48:50 | 304,278,015 | 0 | 0 | null | 2020-10-15T09:38:41 | 2020-10-15T09:38:40 | null | UTF-8 | Python | false | false | 484 | py | # Generated by Django 3.0.3 on 2020-10-15 10:41
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Hero',
fields=[
('id', models.AutoField(aut... | [
"[email protected]"
] | |
1ea382c2fc6c2ec0d464fd19f2ad02fc75054f27 | 755ae8334ec6df9d44e0f9bb263aa0227df3ca95 | /algoxpert/validate_subsequence.py | f0e87021505c62cbfe35441ac0cd9e85090e7ac7 | [] | no_license | adeoti-ade/coursera-algo-challenge | 4a1b445c7dd5a47b61ca45bcbaa2c3aeedc3d042 | 2ae8490deb280f0a3298deb5e5de280b2f3cc062 | refs/heads/main | 2023-08-30T14:05:51.669681 | 2021-11-13T04:34:45 | 2021-11-13T04:34:45 | 409,127,768 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 551 | py | class ValidateSubsequence:
def __init__(self, array, sequence):
self.array = array
self.sequence = sequence
def first_method(self):
seq_idx = 0
array_idx = 0
while array_idx < len(self.array) and seq_idx < len(self.sequence):
if self.array[array_idx] == self.... | [
"[email protected]"
] | |
5bad366d4a602d27d7277289398a5575abb3d140 | 16b19ab9b1b3a957eb8b002d12415a88d20fb738 | /delete_images.py | f6d48cff209b80e5a601c59a5f601f8598599462 | [] | no_license | vvs14/python-utilities | 6f41a23b638d6073edd28b9c4abd7fe8b8b9437d | 56178f7306b542e4e2697c9b1b9754f05012dc5b | refs/heads/master | 2021-01-21T13:03:08.899622 | 2017-09-25T15:37:33 | 2017-09-25T15:37:33 | 54,792,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 869 | py | '''
@author Vivek Vikram Singh
@date 26.03.2016
Program to Delete all image files in given Directory and all of its sub directories.
To input correct directory path : go to that directory, right click on any file and see the path. Give that path in input.
Can be used to remove images from a directory where images are n... | [
"[email protected]"
] | |
2e329c5f09c70f172be9bb6c6f526dac5da7c9ed | 6b42891bfbd430638be7d800dd02d95c27183ad8 | /adinv/migrations/0005_auto__add_advert__add_field_adslot_ad_chooser.py | 552352ce78bb0733b1260396a65a3df162e6f33e | [] | no_license | carlio/django-adinv | bf6123d0ad8f0b2a42efa132f638e319d4f0c68f | e5356ccc4e8991166b5dcdd025da01e7263a3aeb | refs/heads/master | 2020-05-17T20:27:47.029126 | 2012-12-01T13:48:43 | 2012-12-01T13:48:43 | 5,946,359 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,812 | py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Advert'
db.create_table('adinv_advert', (
('id', self.gf('django.db.models.field... | [
"[email protected]"
] | |
512cccdff042b753e66c88811c3fe1daaa5ce10b | d488f052805a87b5c4b124ca93494bc9b78620f7 | /google-cloud-sdk/lib/googlecloudsdk/command_lib/accesscontextmanager/zones.py | 7769f86c280257e290b19cd283c994d3d59183d5 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | PacktPublishing/DevOps-Fundamentals | 5ce1fc938db66b420691aa8106ecfb3f9ceb1ace | 60597e831e08325c7e51e8557591917f7c417275 | refs/heads/master | 2023-02-02T04:48:15.346907 | 2023-01-30T08:33:35 | 2023-01-30T08:33:35 | 131,293,311 | 13 | 19 | null | null | null | null | UTF-8 | Python | false | false | 7,142 | py | # Copyright 2017 Google Inc. 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 applicable law or ag... | [
"[email protected]"
] | |
7e29e532d2f1285cd50e39b2cb2212b658e5b9a8 | 149db911cd5b9f404e5d74fd6c8ed047482d2c22 | /backend/menu/migrations/0001_initial.py | 2c07fd16d8ed613c8286821c487d80336fef03b4 | [] | no_license | crowdbotics-apps/bigbitesgrill-22907 | 45814458930ad7aed64a1f4941aabd930f1f2587 | 6cd1b7b663de21c7587cdbce1612c4807e2cc5f6 | refs/heads/master | 2023-01-14T05:10:18.129338 | 2020-11-23T03:27:17 | 2020-11-23T03:27:17 | 315,189,727 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,144 | py | # Generated by Django 2.2.17 on 2020-11-23 03:26
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('delivery_user_profile', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | [
"[email protected]"
] | |
bed06b0ef7c181eeae4f298e82e61e87e8d795b5 | bb2507bb1757462e931b339bab6a59c877171a00 | /src/models/archieved/efficientnetlite1.py | a263d3500cf905aff06805b92a440060dacd6bf1 | [] | no_license | el16y2w/Mobile-Pose | ddc515ae2321ea2b7fbbb2b69e947ccedcd24cb6 | 14b0e27fe2631d4ad0f8cf7dfc2c3f06671c0670 | refs/heads/master | 2023-01-04T01:23:34.914151 | 2020-10-30T07:44:46 | 2020-10-30T07:44:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,026 | py | import os
import config
import tensorflow as tf
import tensorflow.contrib.slim as slim
import models.efficientnet.lite.efficientnet_lite_builder as efficientnet_lite_builder
from models.outputlayer import finallayerforoffsetoption
class EfficientNetLite1:
def __init__(self, shape,is4Train=True,model_name = "effici... | [
"[email protected]"
] | |
bd21f9f9fa89f4649931f3c82b4fec92d0236194 | f085db42060d1616fcd4e1808cd1b8d6dc0fc913 | /beluga/continuation/ContinuationSolution.py | 32fe96a3d4e0a8b98ab3036cb4d04465fed94bec | [
"MIT"
] | permissive | thomasantony/beluga | 415aabc955a3ff08639e275f70a3608d0371b6b8 | 070c39476e07a6d5e900a2f9b3cd21c0ae7f9fe7 | refs/heads/master | 2021-09-04T20:13:40.757066 | 2018-01-22T02:40:34 | 2018-01-22T02:40:34 | 118,074,853 | 3 | 1 | null | 2018-01-19T04:00:09 | 2018-01-19T04:00:09 | null | UTF-8 | Python | false | false | 43 | py | class ContinuationSolution(list):
pass
| [
"[email protected]"
] | |
adf6af0524df6ab886504be487d226bb8e2ea86d | eb9c3dac0dca0ecd184df14b1fda62e61cc8c7d7 | /google/ads/googleads/v4/googleads-py/tests/unit/gapic/googleads.v4/services/test_ad_parameter_service.py | 738eff76504f6163898c0336379da593536d1d5b | [
"Apache-2.0"
] | permissive | Tryweirder/googleapis-gen | 2e5daf46574c3af3d448f1177eaebe809100c346 | 45d8e9377379f9d1d4e166e80415a8c1737f284d | refs/heads/master | 2023-04-05T06:30:04.726589 | 2021-04-13T23:35:20 | 2021-04-13T23:35:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 34,565 | py | # -*- coding: utf-8 -*-
# Copyright 2020 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | [
"bazel-bot-development[bot]@users.noreply.github.com"
] | bazel-bot-development[bot]@users.noreply.github.com |
2c69894e250cac1001e365aa618ab94646a07ca5 | 12e45ab1a4d996c121f7ebc6a5a60621aaba8354 | /codingbat/String-1/make_tags.py | c159a0edd57c378691498f747d20cfadc4c0c00e | [] | no_license | dastan717/WedDEV | 843983d27325df1684ffbdc53557942433828ae6 | 00406a43b28f8650bf3b5f5d61d2ab234662d09c | refs/heads/main | 2023-03-13T12:37:48.636671 | 2021-04-02T20:31:50 | 2021-04-02T20:31:50 | 337,782,141 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 67 | py | def make_tags(tag, word):
return "<"+tag+">"+word+"</"+tag+">"
| [
"[email protected]"
] | |
d31eb44f23dbff95c71cf83b48b059a709466875 | 943f9856deb0777c49c22d0020948b4bfb4d218d | /musicConv/main/forms.py | 61d79b293a7e5d19d516ad120d759dc5f5b021f9 | [] | no_license | A-Aidyn/junctionX2020 | c5569a437f0a56371da6e313e37ae06ce264888f | cb536451c16de50d66fc5a68cea5181581d41a10 | refs/heads/main | 2022-12-28T18:24:15.733643 | 2020-10-11T05:05:33 | 2020-10-11T05:05:33 | 302,698,477 | 0 | 1 | null | 2020-10-10T11:01:27 | 2020-10-09T16:38:02 | Python | UTF-8 | Python | false | false | 328 | py | from django import forms
class DocumentForm(forms.Form):
docfile = forms.FileField(widget=forms.FileInput(attrs={'class': 'upload-input',
'accept': '.mp3,audio/*',
'onchange':'selectedFileHandle... | [
"[email protected]"
] | |
52c48698286b8482a49b52c1571e580e9aef70e3 | 4edde33f251e56c6433c07272375ae66f8025736 | /learning_templates/basic_app/templatetags/my_extras.py | 38f5e3569696c01d2462a015a693cfc5b9e13050 | [] | no_license | tomthomask/django-deployment-example | a7dc460306604df24e3cc4bcecc280838500c2d7 | 57ececfcacb4213f3ac66c536becdaa2cdb1ece8 | refs/heads/master | 2022-11-30T03:35:28.768061 | 2020-07-28T19:26:25 | 2020-07-28T19:26:25 | 283,304,023 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | from django import template
register = template.Library()
@register.filter(name='cut')
def cut(value, arg):
"""
This cuts out all values of "arg" from the string!
"""
return value.replace(arg,'')
# register.filter(cut,'cut')
| [
"[email protected]"
] | |
78a6cf0cdb92b81e5e9348782f2384c58ed1d4ec | e76a97c024709ccca57a7ca127eb886c219563a0 | /stack_180403.py | 8fb01616bc960ebee4b802838f643c07d37fb2be | [
"Apache-2.0"
] | permissive | Jianyang-Hu/numpypractice | 7731adc9252ac9804ecac484a491a240f4ff9567 | f4d4a3e28f5dd10f9722f83b1ac66f0f2ccef8b9 | refs/heads/master | 2022-11-22T09:50:58.978715 | 2020-07-09T09:10:41 | 2020-07-23T14:32:51 | 281,971,693 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 592 | py | # -*- coding: utf-8 -*-
# @version : Python3.6
# @Time : 2018/4/3 16:35
# @Author : Jianyang-Hu
# @contact : [email protected]
# @File : stack_180403.py
# @Software: PyCharm
import pandas as pd
import numpy as np
from pandas import Series,DataFrame
data = DataFrame(np.arange(6).reshape(2,3),
... | [
"[email protected]"
] | |
41ff1a640390f6409ed6908f2a856935291a5cd4 | 543cc60477cef7fc8cda349730f7296fdb7329d6 | /genetic.py | 4029c0d7d9622e4ac6faa0be6fda7157e1dd3a12 | [] | no_license | cppower/abcde | f671f1ef770d8cc079238ae52d21ba3356610996 | 110dfa354aaf1164c365bd9eaf7e7642db5d3098 | refs/heads/master | 2021-01-11T04:56:10.498851 | 2017-02-18T20:16:42 | 2017-02-18T20:16:42 | 77,073,723 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,276 | py | from random import *
from time import time
from dames import testDFS
NB_PARAMS = 1
TAILLE_CHROMO = 4
TAILLE_TOTALE = NB_PARAMS*TAILLE_CHROMO
POPULATION = 100
MUTATION = 0.005
CROSSOVER = 0
NB_GENERATIONS = 1
resultats = [0 for i in range(0,POPULATION)]
class Plateau:
def __init__(self,pB= 1<<50|1<<49|1<<48|1<<47|1<<4... | [
"[email protected]"
] | |
e5072b920c58d5c622ce4f52ceaa2a1322f10365 | 48cb0870c4c50dfc158f4be1506933540a7eb404 | /interpreter/interpreter.py | 624b73f6f666dd089ba9ee880fa4ec3d7c8b969b | [] | no_license | luap42/talos | 79fc37ad3787501ab0e2260626b6476b943f502d | 212940a9f99f160d671605c24be4c069dfc90d61 | refs/heads/master | 2021-06-23T03:07:23.177414 | 2017-09-01T14:55:41 | 2017-09-01T14:55:41 | 102,121,796 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 35,624 | py | import sys, copy, time
from stdlib import *
from lexer import *
Symbols = SymbolTable()
Procedures = SymbolTable()
Structures = SymbolTable()
Instances = SymbolTable()
RANDOM_SEED = Random()
OBJECT_COUNT = Random()
def eval_term(term):
term = [t if not t.type == "CONCRETE" else Token("EVALCONC", str(round(float(... | [
"[email protected]"
] | |
9eacf51b771582912383d366bc98f91903c6d7a8 | b6097c94aed4137280b4bd03edf10d8c45b99970 | /translator/urls.py | 8c44f50e91734ad4d2073be26745b404d842cdcc | [] | no_license | letsgo247/breakorean | efd6399320470ac1014ae1bf064b623ec1e2cb2c | efa0745c25444c52097a54fbbf9ce898a4763aad | refs/heads/master | 2020-07-24T13:41:59.520619 | 2019-10-20T15:45:37 | 2019-10-20T15:45:37 | 207,946,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | from django.urls import path
from . import views, andviews
urlpatterns = [
path('', views.cover, name='cover'),
path('select', views.select, name='select'),
path('translator<int:alg_id>', views.translator, name='translator'),
path('translated<int:alg_id>', views.translated, name='translated'),
pat... | [
"[email protected]"
] | |
d2abdd3e0b8a17bc75a2300b1b927c931a86913f | f4092fbe29f80c4ae715730508477fefd9994837 | /taskmate/todolist_app/admin.py | 5e8f4133a5bdaab0d3798434a368f1167b8885b9 | [] | no_license | naxus1/Django | 320e255d11c3776f4d058b2d4e7da2f5a61c3e0b | c94d59798f2ebe5da229f0574c23fa773569d4cf | refs/heads/master | 2022-12-02T14:14:59.951633 | 2021-01-15T02:59:59 | 2021-01-15T02:59:59 | 221,952,801 | 1 | 0 | null | 2022-11-22T06:43:55 | 2019-11-15T15:37:10 | Python | UTF-8 | Python | false | false | 135 | py | from django.contrib import admin
from todolist_app.models import TaskList
# Register your models here.
admin.site.register(TaskList)
| [
"[email protected]"
] | |
247be7466490103c5d82ac4620f83f5af32e4ea4 | 9c1966721f83c63e46788509951c273e2f8f9491 | /data structures/bst_insert.py | ef4d5aecff4aec1836efbd7c0028a445da77166e | [] | no_license | maiman-1/hackerrank-dump | daba30e81e6fdb118ed9b77dcc9393846468a17c | e499c923a8768efafde18e65c055c2ec8b219014 | refs/heads/main | 2023-06-03T12:30:17.827010 | 2021-06-27T04:22:09 | 2021-06-27T04:22:09 | 375,561,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,006 | py | class Node:
def __init__(self, info):
self.info = info
self.left = None
self.right = None
self.level = None
def __str__(self):
return str(self.info)
def preOrder(root):
if root == None:
return
print (root.info, end=" ")
preOrder(root.left)
... | [
"[email protected]"
] | |
46420d6d79533b4847126b91595955ff96211153 | 0a46b027e8e610b8784cb35dbad8dd07914573a8 | /scripts/venv/lib/python2.7/site-packages/cogent/maths/stats/information_criteria.py | ead8f6417df1dd2fa2049a479c7f9aa4b4de1829 | [
"MIT"
] | permissive | sauloal/cnidaria | bb492fb90a0948751789938d9ec64677052073c3 | fe6f8c8dfed86d39c80f2804a753c05bb2e485b4 | refs/heads/master | 2021-01-17T13:43:17.307182 | 2016-10-05T14:14:46 | 2016-10-05T14:14:46 | 33,726,643 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,145 | py | from __future__ import division
import numpy
__author__ = "Gavin Huttley"
__copyright__ = "Copyright 2007-2012, The Cogent Project"
__credits__ = ["Gavin Huttley"]
__license__ = "GPL"
__version__ = "1.5.3"
__maintainer__ = "Gavin Huttley"
__email__ = "[email protected]"
__status__ = "Production"
def aic(lnL,... | [
"[email protected]"
] | |
ce430d5d36bbec0fa9337f2273b604c280b16dbc | 453a45dfab9fd06b0445f0e49a75bb52ee8b37dc | /scripts/cgminerstats.py | f978f6e818ca8f32f2170bca08b852cd90f383de | [
"WTFPL"
] | permissive | setkeh/cgminer-python | c18f3dfa88009ee5965e09d76f916f592826a6cc | b17ec3f8fe73bf736260413d84d723a3e0378ced | refs/heads/master | 2021-01-21T23:14:25.419394 | 2015-02-26T23:55:32 | 2015-02-26T23:55:32 | 10,754,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 997 | py | #!/usr/bin/env python2.7
from pga0 import *
from cgminerversion import *
from cgminerconfig import *
from coin import *
from pga1 import *
print "CGMiner:"
print "Cgminer Version:", cg_version()
print "Api Version:", api_version()
print "PGA's Connected:", pga_count()
print "ASIC's Connected:", asic_count()
print "Po... | [
"[email protected]"
] | |
f42b24eb133af9fb0d043daae02623831e534124 | c17ca7a7824056f7ad58d0f71abc25670b20c1fc | /cenet/populations_xml.py | 50514b7f8ab3d1c783e713a36c3b795c93d91dae | [
"Apache-2.0"
] | permissive | Si-elegans/Web-based_GUI_Tools | cd35b72e80aa400105593c5c819355437e204a81 | 58a9b7a76bc46467554192a38ff5329a94e2b627 | refs/heads/master | 2023-01-11T09:11:21.896172 | 2017-07-18T11:10:31 | 2017-07-18T11:10:31 | 97,445,306 | 3 | 1 | Apache-2.0 | 2022-12-26T20:14:59 | 2017-07-17T07:03:13 | JavaScript | UTF-8 | Python | false | false | 67,096 | py | POPULATIONS_TEMPLATE =\
"""
<population id="ADAL" component="" type="populationList">
<instance id="0">
<location y="8.65" x="-239.25" z="31.050000000000001"/>
</instance>
</population>
<population id="ADAR" component="" type="populationList">
... | [
"[email protected]"
] | |
6414139850343e0efe620371e16f2883d3045f33 | 74bdcebcc6fdf66c69c04d4d2ea2c4ac0592dd99 | /layers/vsgc_layer_pre.py | 28e5f33e2166d77c4e0cf28132998f71d0a6a6f5 | [] | no_license | lt610/DeeperGNNS | 470bfd8a2db6860db79cb9578e747863a9f26554 | 1e5c36b49342908c38aefc3541d7f70059565d33 | refs/heads/master | 2023-01-27T12:09:03.993995 | 2020-12-06T12:21:51 | 2020-12-06T12:21:51 | 282,876,382 | 10 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,655 | py | import torch as th
from torch import nn
import dgl.function as fn
from layers.pair_norm import PairNorm
import dgl
class VSGCLayerPre(nn.Module):
def __init__(self, in_dim, out_dim, bias=True, k=1, alpha=1, lambd=1, dropout=0):
super(VSGCLayerPre, self).__init__()
self.linear = nn.Linear(in_dim, o... | [
"[email protected]"
] | |
5c713e71b6d36c733a3c7071ffaec82c80094caa | f8826a479f2b9d2f28993ceea7a7d0e3847aaf3d | /apps/requestlogger/models.py | 9fa6f370798fdbd62b4484b8acf1d332f55c10a0 | [] | no_license | icomms/wqmanager | bec6792ada11af0ff55dc54fd9b9ba49242313b7 | f683b363443e1c0be150656fd165e07a75693f55 | refs/heads/master | 2021-01-20T11:59:42.299351 | 2012-02-20T15:28:40 | 2012-02-20T15:28:40 | 2,154,449 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,869 | py | from django.db import models
from django.contrib.auth.models import User
from domain.models import Domain
import os
import logging
import settings
# this is a really bad place for this class to live, but reference it here for now
from scheduler.fields import PickledObjectField
from datetime import datetime
from dja... | [
"[email protected]"
] | |
ae180e8cf37b46499f5232dd71f2789e8e56b342 | a16691abb472e2d57cf417cc671e7574f97aaf23 | /src/13_millas.py | 785d28eea60a685a38043e0f43f552b1e14265d4 | [
"MIT"
] | permissive | agomusa/oop-algorithms-python-platzi | fbb16208b68e822c6232ffb944c414c176004ac1 | 56e5f636c9243fbd81148a6e6e8405034f362c70 | refs/heads/main | 2023-06-19T21:38:19.925134 | 2021-07-07T20:49:09 | 2021-07-07T20:49:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 733 | py | class Millas:
def __init__(self):
self._distancia = 0
# Función para obtener el valor de _distancia
def obtener_distancia(self):
print("Llamada al método getter...")
return self._distancia
# Función para definir el valor de _distancia
def definir_distancia(self, recorrido):
print("Llamada al método sette... | [
"[email protected]"
] | |
017d1388db426775c4c7bd1d1c8f5b3ddf57f674 | 1fdc21ac035f53c1d51d02ef4c0cd0b9333ff0ca | /00_stats_backend/stats_backend/serie/serializers.py | c1712a8b5a8b2a31c994dbb7c179bceb415f4e2c | [] | no_license | RoscaS/stats_stats-dashboard | 42a3d22160e27c4ebb060640e7f5ca263fc004c4 | 359506ac071189dbde64c0756ed772ec7991987f | refs/heads/master | 2023-01-12T11:06:23.316993 | 2019-06-23T01:58:06 | 2019-06-23T01:58:06 | 177,424,980 | 0 | 0 | null | 2023-01-03T18:27:01 | 2019-03-24T14:21:51 | Python | UTF-8 | Python | false | false | 239 | py | from rest_framework import serializers
from serie.models import Serie
class SerieSerializer(serializers.ModelSerializer):
class Meta:
model = Serie
# fields = '__all__'
fields = (
'data',
)
| [
"[email protected]"
] | |
b254df743e617dfd1390743f0e04bbe4d12cb542 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03227/s922156594.py | 3367f99a10180d83d75fbea989fb7e0b5a810cdd | [] | 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 | 173 | py | import sys
def input(): return sys.stdin.readline().rstrip()
def main():
s=input()
if len(s)==2:print(s)
else:print(s[::-1])
if __name__=='__main__':
main() | [
"[email protected]"
] | |
52e24c59cf1ba45ebea9a276fd030f94948fe43a | 335e07c271bd181e21295986612b1e94964100f3 | /3d.py | 818fd8de8efdeaf1678ad4a78941b268054b22d9 | [] | no_license | johnql/eecs-Molecular | 0df36796e328688f077ed6dfd80c99e826260cbb | ce59f406f0ba40521abb2b7e9fd9f53f90526dcd | refs/heads/master | 2021-07-25T11:57:57.792284 | 2021-01-06T16:14:49 | 2021-01-06T16:14:49 | 236,077,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 608 | py | # -*- coding: utf-8 -*-
import ase
import pandas as pd
struct_file = pd.read_csv('../champs-scalar-coupling/structures.csv')
import random
# Select a molecule
random_molecule = random.choice(struct_file['molecule_name'].unique())
molecule = struct_file[struct_file['molecule_name'] == random_molecule]
display(molecu... | [
"[email protected]"
] | |
823010365cec2bba9e72158d01b1943f84ed8217 | b782c69e18bdd074c40d7fad0983afa0743f8b4a | /Problem_31.py | 8cd863bbb3e1caf867102351f2196e212197669e | [] | no_license | danjoh94/My_Project_Euler_Solutions | a4dc90b85b8b49a4a149efb9756896cf4f1d1d45 | c7a8ca82da32473176b5290ce56157105aa7976e | refs/heads/master | 2020-03-26T22:31:55.041731 | 2018-08-20T20:13:17 | 2018-08-20T20:13:17 | 145,466,207 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,246 | py | #!/usr/bin/env python3
# -*- coding: cp1252 -*-
'''
Problem 31: Coin Sum
https://projecteuler.net/problem=31
Problem definition
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:
1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).
It is possible to make £2... | [
"[email protected]"
] | |
b3398fa2ff067bc32bfe54cd1d0f1e55c10c2916 | 77c91f553b6fae236f341868b9da0c4821ee5048 | /tictactoe.py | 498ba9d208da6f8508088bd3c622205d04966dd0 | [] | no_license | awsdcrafting/SmartTicTacToe | b191dd512764e7985b547a9119ff98ded68d195c | 5600db89abc9ee4b30911865942780133332deef | refs/heads/master | 2023-01-09T01:47:29.367263 | 2020-11-11T10:36:19 | 2020-11-11T10:36:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,596 | py | import sys
import numpy as np
class TicTacToe:
def __init__(self):
self.game_board = np.zeros((3, 3), dtype=np.int16)
def make_move(self, player_id, x, y):
if not self.game_board[y][x] == 0:
sys.exit("Error: Tried to make a move on an already occupied tile")
self.game_boa... | [
"[email protected]"
] | |
db028508c74e67d79784aae349aac5f05d584df9 | abfe7041f66b9441e5748d3eeae36abedf94e708 | /contactform/views.py | e854f3bff3a0e60f8869736f5003808766a99e29 | [] | no_license | SaurabhKumarVerma/newsfeed | 743333ff10354723f234fa6513927693ff4f9449 | 57271b3f4e45e7cde500e0eff8cd0874bd796172 | refs/heads/main | 2022-12-30T22:45:07.114578 | 2020-10-22T10:08:49 | 2020-10-22T10:08:49 | 303,373,271 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,060 | py | from django.shortcuts import render , get_object_or_404,redirect
from . models import ContactForm
from news.models import News
from cat.models import Cat
from subcat.models import SubCat
from django.contrib.auth import authenticate, login , logout
import datetime
def contact_add(request):
perm = 0
for i in reque... | [
"[email protected]"
] | |
6d79597dadc347377df75d911a978524b5fe957d | 4226cc08b0f619a3455327f665d34fdaae1fb4f4 | /Automated Forex Trading System/Fnc_Main.py | cf998783c569a07a4e215f896348b69c429efedd | [] | no_license | andrewlai61616/personal_website | 25d3f2f49c443b12e14ba541d0a5105fd26fca12 | 99e30d975fb3948f51afdc6e40e0cb66da0edb99 | refs/heads/master | 2022-11-22T20:36:20.963801 | 2020-07-26T17:42:38 | 2020-07-26T17:42:38 | 266,386,595 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,011 | py | import VAR
import Get_On_Browser
import Visit_Web
import os, time, getopt, datetime
from bs4 import BeautifulSoup
def check_1_day_restart_web( password ):
if datetime.datetime.today() > VAR.last_web_open_time + datetime.timedelta(days = 1):
print("One day passed. Web restarting...")
VAR.web = None
Visit_Web.vis... | [
"[email protected]"
] | |
56b1362b2bb0522b8eee7d20ce388801ae547fc8 | cf97fddb63f82c65f622319070b1103d34abe0e9 | /Ordenador/PrimosMP.py | 6a5eeafd5c3fe8b11004fc2b90c0cbbac37c3c35 | [] | no_license | ESapenaVentura/ComputAv | c0ead563d5106952859e16aec8140b7c1291ddc6 | 5376b45a62548e794358b207d220ea43dbb4b82f | refs/heads/master | 2020-04-05T22:05:14.868298 | 2018-11-12T16:43:15 | 2018-11-12T16:43:15 | 157,244,353 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,503 | py | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 6 14:56:59 2018
@author: Enrique
"""
import sys
from math import sqrt
from multiprocessing import Pool,Manager
from queue import Empty
CURRENT_VERSION = sys.version_info
REQUESTED_VERSION = (3, 7)
if (CURRENT_VERSION >= REQUESTED_VERSION):
from t... | [
"[email protected]"
] | |
88849cbaefdac0da35473ee45aca6e6b65848d1d | f211bdc7eb567529dcab51547ad9147ac9b21d0b | /divisible.py | 4e958f61c4f412917ff2118dfbd66d999cbde175 | [] | no_license | Hamza746/assigment | 6551f1d7fdfe4eb4f1a652ace80e5b384d1d8b12 | d67051771f5fce826dde10134fd852a030453c5f | refs/heads/master | 2020-09-12T09:26:46.506888 | 2019-11-18T07:15:04 | 2019-11-18T07:15:04 | 222,381,770 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 343 | py | # Write a Python function to check whether a number is completely divisible by another number.
# Accept two integer values form the user
a = int(input("put numerator:"))
b = int(input("put denuminator:"))
c = a%b
print(c)
if c==0:
print("both numbers are completely divisible")
else:
print("both numbers are not ... | [
"[email protected]"
] | |
b6bbb6f5cdddba874b8e7c74471e4bb45a157100 | 30f4230650a73d3cb112ab17a46c9c9375734308 | /Covid_chat_bot.py | 72ef13f0267f5701e927d37a5585c60fb0487005 | [] | no_license | suyash-dubey/PROJECT-2-COVID-CHATBOT | f47108b44aebb23e1b33f59d8e17591bffd8f306 | 7fc147b56268697355e5b1c606c680860c89cd29 | refs/heads/main | 2023-06-10T02:00:04.503911 | 2021-07-03T07:54:08 | 2021-07-03T07:54:08 | 382,557,861 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,864 | py | import random
from newspaper import Article
import string
import nltk
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import numpy as np
import warnings
warnings.filterwarnings('ignore')
#pip install newspaper3k
nltk.download('punkt',quiet... | [
"[email protected]"
] | |
ddf47d224f7d5fdde321387abe4c3738cc0dd469 | 75669dfdd9099abe887f92a380c05691ea705653 | /requests/utils.py | f960d315839ff603e54f4efdfb9b1ae6089e27b9 | [] | no_license | robspychala/viva-viva-viva | 34c20015a5467b1774933ee65288cbf7b87f0a4d | c818e6f82c254756ca6f2be33d232df0aa643fa6 | refs/heads/master | 2016-09-06T08:43:29.734456 | 2012-02-27T19:07:05 | 2012-02-27T19:07:05 | 702,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,713 | py | # -*- coding: utf-8 -*-
"""
requests.utils
~~~~~~~~~~~~~~
This module provides utility functions that are used within Requests
that are also useful for external consumption.
"""
import cgi
import codecs
import os
import random
import re
import zlib
from netrc import netrc, NetrcParseError
from .compat import parse... | [
"[email protected]"
] | |
9fd7523e1e92abd108de38b09b2a4cc62bdc466a | c291ae69a84071a2ef4498e1fd9d3bfe858b2a39 | /lists/migrations/0002_item_text.py | d01868b305a83e745386c1e023c49eb7d4edc120 | [] | no_license | frnnditl/tdd-project | b89dd1f78c50bf34921484d130147abc44d59cd2 | b44db65787213160b80905fd3603acf8f17596fe | refs/heads/main | 2023-07-09T18:15:02.051074 | 2021-08-11T02:17:44 | 2021-08-11T02:17:44 | 392,816,847 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-08-05 23:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lists', '0001_initial'),
]
operations = [
migrations.AddField(
... | [
"[email protected]"
] | |
ecf95813235c0c0c2163b797af72deef230472e6 | 925aae508fa819f970aa08650673263be53499b7 | /day14/code/main.py | 40e3df0bc0faee6d14104bdb11268a3f17190bd6 | [
"MIT"
] | permissive | JoseTomasTocino/AdventOfCode2020 | b1a8fa044d8d30d6e892b83887dabf706d52792f | 19b22c3f9ef2331f08c2ad78f49f200a5f4adfc9 | refs/heads/main | 2023-02-07T02:49:06.184815 | 2020-12-25T07:16:48 | 2020-12-25T07:16:48 | 317,473,074 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,678 | py | import logging
import re
logger = logging.getLogger(__name__)
def sum_memory_values(inp):
mask = None
mem_values = {}
for line in inp.split("\n"):
if line.startswith("mask"):
mask = line.split(" = ")[1]
logger.info(f"Mask set to {mask}")
elif line.startswith("me... | [
"[email protected]"
] | |
29a36a063b1630bee078dd539e430c484d598da9 | c61eb1a59f66d36ad0c2a3dffc172614d9259623 | /week1/the_real_deal/bomberman_test.py | 5cb62cf6d68e52c87113ddca8c7ae2fc6c96863a | [
"BSD-3-Clause"
] | permissive | sevgo/Programming101 | d8361a057f78bc91110082584c7d4cbc05746f10 | ac25c4d9695563b449a629c60ec77a739c9f5be3 | refs/heads/master | 2021-09-28T16:52:22.290888 | 2021-09-16T07:12:53 | 2021-09-16T07:12:53 | 30,528,205 | 0 | 0 | BSD-3-Clause | 2021-09-16T07:12:54 | 2015-02-09T09:28:31 | Python | UTF-8 | Python | false | false | 633 | py | #!/usr/bin/env python3
import unittest
import bomberman as bman
class Test_Bomberman(unittest.TestCase):
def setUp(self):
self.matrix = [[1, 2, 3], [4 ,5 ,6], [7, 8, 9]]
self.current_position = (2, 1)
def test_move_up(self):
self.assertIsInstance(bman.move_up(self.current_position)... | [
"[email protected]"
] | |
11cd4d65d01665c0d10e4866ca5ef1b2c881800c | be9d18c3ac86921e8899a830ec42d35edd440919 | /moztrap/view/runtests/finders.py | 233321205408e7918ea9601274a03b83139b0057 | [
"BSD-2-Clause"
] | permissive | AlinT/moztrap | abcbf74893d10f7bcf77b4ed44fa77bd017353d6 | 13927ae3f156b27e4dd064ea37f2feae14728398 | refs/heads/master | 2021-01-18T08:21:52.894687 | 2012-09-26T19:54:57 | 2012-09-26T19:54:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | """
Finder for running tests.
"""
from django.core.urlresolvers import reverse
from ... import model
from ..lists import finder
class RunTestsFinder(finder.Finder):
template_base = "runtests/finder"
columns = [
finder.Column(
"products",
"_products.html",
model.... | [
"[email protected]"
] | |
f6bc22245c7cb103030cdfa5a1ef7c3f73147fed | eebd761d1f298e1917dcbbbe01931fc946da9037 | /tests/test_elb_scaler.py | faedccecb19d1f1f19231227473236c89bbf4384 | [
"MIT"
] | permissive | rjw1/notifications-paas-autoscaler | 9f293b7770f3100360d2b5b3dc3fdd83e4f0875e | 753a2e40fd832129dfed4c7d1fce84e7a9ab08ff | refs/heads/master | 2023-08-03T09:30:39.081481 | 2018-12-21T17:15:00 | 2018-12-21T17:15:00 | 179,267,030 | 0 | 0 | MIT | 2023-07-22T01:26:52 | 2019-04-03T10:29:40 | Python | UTF-8 | Python | false | false | 2,843 | py | from unittest.mock import patch, Mock
import datetime
from freezegun import freeze_time
from app.elb_scaler import ElbScaler
@patch('app.base_scalers.boto3')
class TestElbScaler:
input_attrs = {
'min_instances': 1,
'max_instances': 2,
'threshold': 1500,
'elb_name': 'notify-paas-p... | [
"[email protected]"
] | |
ba11fe85c801d07e0e7c25b58d3aee09665d8952 | 77a7508c3a647711191b924959db80fb6d2bd146 | /src/gamesbyexample/worms.py | 2bea231d0dbdaeacc62cad083fcc56fafc920fb4 | [
"MIT"
] | permissive | surlydev/PythonStdioGames | ff7edb4c8c57a5eb6e2036e2b6ebc7e23ec994e0 | d54c2509c12a5b1858eda275fd07d0edd456f23f | refs/heads/master | 2021-05-22T21:01:15.529159 | 2020-03-26T07:34:10 | 2020-03-26T07:34:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,750 | py | """Worm animation, by Al Sweigart [email protected]
A screensaver of multicolor worms moving around.
NOTE: Do not resize the terminal window while this program is running.
Tags: large, artistic, simulation, bext"""
__version__ = 0
import random, shutil, sys, time
try:
import bext
except ImportError:
pri... | [
"[email protected]"
] | |
0b879b61c2d2b1641c7c52ec97b5e9506509dfd9 | 300cd7b8c6a4f05c3d1c455d4a37d7a1dd12bd28 | /something.py | ead38d2c401f6ef69fdbdb8dc02ed7d85e47230d | [] | no_license | cravenormality/portfolioterm3 | 5a370b7bfd46f192b1719eee9e0dcbd169e8db6a | 0273ab8adeb963fbb3a382e9367666a55e5204c0 | refs/heads/master | 2020-04-29T01:33:37.442705 | 2019-03-15T17:02:12 | 2019-03-15T17:02:12 | 175,734,716 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,808 | py | class Book:
def __init__(self,id,bookName,authorName,nextNode=None):
self.id = id
self.bookName = bookName
self.authorName = authorName
self.nextNode = nextNode
def getId(self):
return self.id
def getBookName(self):
return self.bookName
def... | [
"[email protected]"
] | |
d6d512c136236a1eaa11f240711e2585c457e14b | a19862a780b9a210be52dab1312fb579d58eb1c4 | /Listeners/main.py | 77386a9be1038a8c095aa35d8e0c50e707025175 | [] | no_license | artbakulev/design_patterns | e8915f5e5f664adbce5a56f5f5c2116c043b45dc | dd958a7539d8c61f6d21030bf462f89d617206bf | refs/heads/master | 2021-02-25T20:20:44.378522 | 2020-03-06T16:06:34 | 2020-03-06T16:06:34 | 245,462,206 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 655 | py | from Listeners.WeatherStation import WeatherStation
from Listeners.Widgets import CurrentTemperatureWidget, CurrentHumidityWidget, \
CurrentWindSpeedWidget
import threading
if __name__ == '__main__':
weather_station = WeatherStation()
temperature_widget = CurrentTemperatureWidget()
humidity_widget = ... | [
"[email protected]"
] | |
ecf839c9ca68216641195e95ef5da5bca7e6347b | 2315b173b7a04c8c94b188394aff4656a3b82a9b | /lib/net/rpn.py | d8e3a899db703fd57da78a00b123dd86c96395f7 | [
"MIT"
] | permissive | StiphyJay/WS3D | a551b7c169990cf0699ddd48a43d59c1148f2aeb | db90ba12026fb1c4a12e9b791117d6af4ccb052f | refs/heads/master | 2022-11-27T23:52:00.387317 | 2020-08-15T04:58:58 | 2020-08-15T04:58:58 | 288,369,260 | 1 | 1 | MIT | 2020-08-18T06:03:39 | 2020-08-18T06:03:38 | null | UTF-8 | Python | false | false | 3,375 | py | import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import pointnet2_lib.pointnet2.pytorch_utils as pt_utils
import lib.utils.loss_utils as loss_utils
from lib.config import cfg
import importlib
class RPN(nn.Module):
def __init__(self, use_xyz=True, mode='TRAIN',old_model=False):
supe... | [
"[email protected]"
] | |
39d5d73a87262faab89558aa4446f0842fe38201 | 80b9a0ed15abb992c93b3d9d4dab2a36243d0708 | /player.py | 56fae7266e1f99cacea026998ba45c5702a43190 | [] | no_license | munir78/80sBeatUmUp | 8a1ec049e21086afe0af5d3cbed98c9d745c3b44 | 576a558bb9dc307cc56edf83c2b700ac07eecb94 | refs/heads/master | 2020-12-02T19:17:08.597421 | 2017-08-20T21:24:12 | 2017-08-20T21:24:12 | 96,318,567 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 464 | py | import pygame
class Player:
x = 200
y = 300
dx = 0
dy = 0
falling = False
def update(self, screen):
self.x += self.dx
self.dx *= 0.9
print(self.dy)
self.y += self.dy
self.dx = self.dx * 0.8
self.dy = self.dy * 0.8
pygame.draw.rect(scr... | [
"[email protected]"
] | |
9c911e28796afc83e4f20e3b1df900cd2030b006 | 4c7a2a7896dc8d23d084d6ef7a1212efd45f705c | /EarningsCallsMultipleStacksCNN.py | 9155e5261cbafe68e649684abceb0926bac5d4ad | [] | no_license | aditya-radhakrishnan/MGMT_Research | 989d6bb487620909bb8d4b5c3ed4d4dd44b55d51 | 2fe311eba8ee99c05de375cdc31f858765158d80 | refs/heads/master | 2021-01-19T01:06:42.194930 | 2016-06-07T16:42:44 | 2016-06-07T16:42:44 | 59,845,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,796 | py | import numpy as np
import tensorflow as tf
import math
from Preprocessor_Wrapper import PreprocessorWrapper
files_list = ['/home/raditya/Documents/untitled folder/multi1.txt',
'/home/raditya/Documents/untitled folder/multi1.txt',
'/home/raditya/Documents/untitled folder/multi1.txt']
m... | [
"[email protected]"
] | |
d8c1443a5dde68ef5f215e0ee6e2f1456193d716 | f8868b09e6f0c72a5e4c0dc488be7c60865d25d1 | /rrt_utils/rrt/rrt_star.py | caa2d31076fe407e582e5dfa7c569faea82fb7c0 | [] | no_license | arush/motion-planning-project | 8730964493e02edca916ad9e25ba412f7634594f | 81836a111186f214273b5569467216e6683ec206 | refs/heads/master | 2021-05-18T01:05:38.393835 | 2020-04-02T08:35:12 | 2020-04-02T08:35:12 | 251,039,249 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,887 | py | # This file is subject to the terms and conditions defined in
# file 'LICENSE', which is part of this source code package.
from operator import itemgetter
from rrt_utils.rrt.heuristics import cost_to_go
from rrt_utils.rrt.heuristics import segment_cost, path_cost
from rrt_utils.rrt.rrt import RRT
class RRTStar(RRT):... | [
"[email protected]"
] | |
68c3596f7b0719e22f39a5bb9add3cf40d285973 | 893f83189700fefeba216e6899d42097cc0bec70 | /bioinformatics/photoscan-pro/python/lib/python3.5/site-packages/qtconsole/jupyter_widget.py | c2a8969866d3d2b0203d59d00013fe1e00dc58b6 | [
"GPL-3.0-only",
"Apache-2.0",
"MIT",
"Python-2.0"
] | permissive | pseudoPixels/SciWorCS | 79249198b3dd2a2653d4401d0f028f2180338371 | e1738c8b838c71b18598ceca29d7c487c76f876b | refs/heads/master | 2021-06-10T01:08:30.242094 | 2018-12-06T18:53:34 | 2018-12-06T18:53:34 | 140,774,351 | 0 | 1 | MIT | 2021-06-01T22:23:47 | 2018-07-12T23:33:53 | Python | UTF-8 | Python | false | false | 22,144 | py | """A FrontendWidget that emulates a repl for a Jupyter kernel.
This supports the additional functionality provided by Jupyter kernel.
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from collections import namedtuple
import os.path
import re
from subprocess im... | [
"[email protected]"
] | |
b2c759567b93cac768c610e6337ebe2ca19626e0 | 735a315ea82893f2acd5ac141f1a9b8be89f5cb9 | /pylib/v6.1.84/mdsscalar.py | 7cf7fe6e0ba174ecd9dc55b37dbdca77b5786088 | [] | no_license | drsmith48/pppl-mdsplus-python | 5ce6f7ccef4a23ea4b8296aa06f51f3a646dd36f | 0fb5100e6718c8c10f04c3aac120558f521f9a59 | refs/heads/master | 2021-07-08T02:29:59.069616 | 2017-10-04T20:17:32 | 2017-10-04T20:17:32 | 105,808,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,108 | py | if '__package__' not in globals() or __package__ is None or len(__package__)==0:
def _mimport(name,level):
return __import__(name,globals())
else:
def _mimport(name,level):
return __import__(name,globals(),{},[],level)
import numpy,copy
_dtypes=_mimport('_mdsdtypes',1)
_data=_mimport('mdsdata',1)
def mak... | [
"[email protected]"
] | |
066a1a08d39f24abbd696adde173c63c13eaef9c | 52022b2780a257e1de5c551e2f0e2a2ecdceb8b7 | /crypto/analyser/final/data/Integration.py | 2fcaf91b104ba5817e5862d5893ebed26cebb1b9 | [] | no_license | pyqpyqpyq/Cryptocurrency-Analytics-Based-on-Machine-Learning | 9e84b73e6e496b32abed29aecf97eb44c9682ed4 | c4334af7984deab02594db2766702490d79159ea | refs/heads/master | 2023-05-10T19:06:31.756084 | 2019-10-31T09:51:07 | 2019-10-31T09:51:07 | 218,730,013 | 0 | 0 | null | 2023-05-07T04:06:03 | 2019-10-31T09:31:28 | Jupyter Notebook | UTF-8 | Python | false | false | 10,065 | py | import pymongo
import pandas as pd
from datetime import datetime, timedelta, date, time as dtime
import gc
import logging
import os, pickle
import time
import numpy as np
def save_pickle(data, filepath):
save_documents = open(filepath, 'wb')
pickle.dump(data, save_documents)
save_documents.close()
def load... | [
"[email protected]"
] | |
5f6ac666d9265fdaba9d9dffc042793d684732b2 | a3ee120ce3b32d20184df44eeb35b38a3423e322 | /image_utils.py | 8d4098ab115428b822978bf48c6d852ba87f4a0b | [
"MIT"
] | permissive | Ikhwansong/ComputerSoftware_OCR | 6857b3af121c5b7767893e72c7a10b27ef77ac87 | e1664c7fd6081e00e39d9b5fbc48e902bbb5fdfc | refs/heads/master | 2022-10-21T02:36:43.333591 | 2020-06-11T20:13:40 | 2020-06-11T20:13:40 | 271,306,157 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,139 | py | import os
from PIL import Image
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import random
import numpy as np
import tensorflow as tf
import math
import cv2
from box_utils import compute_iou
class ImageVisualizer_cv2(object):
def __init__(self, idx_to_name, class_colors = None, sa... | [
"[email protected]"
] | |
5418444e1b1cde83a6aa6d7cba881c88dbc6d153 | 9eb00b3947fdaa4b0ae6ac446b7619076ab2d22e | /digital_acquisition.py | f7b6287fa0ebb2c41ab45a52050b82589ce4fae3 | [] | no_license | boffomarco/RobPerc-Act_19-20_14 | ecae98d0f79044661a1318df74696ed95de7b1e1 | f2775572fad43ab89cad51b9761086dbfc6acea5 | refs/heads/master | 2022-08-01T09:09:36.323964 | 2020-05-27T10:07:17 | 2020-05-27T10:07:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,686 | py | '''This file contains the method to acquire the data of the current converted in digital by the Arduino'''
import RPi.GPIO as GPIO
import time
import csv
DEBUG_MODE=False
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) #arduino 2 corresponding to 20 pin
GPIO.setup(27, GPIO.IN, pull_up_down... | [
"[email protected]"
] | |
64e9cdf5997f59cef79b7aee0ab94042fa58a6e8 | cba6cd07457a3a370c2cb5f2095b1c8760a5488d | /formatting.py | 9f71d30c5416fda8488c3021e1d047f704bf8bd6 | [] | no_license | bq999/python | e0576e4bbd249450efbe0ebc7ec5c7728ab83391 | 0909f33aee755011915a3acd9e90f4e26300bf8c | refs/heads/master | 2021-05-08T16:01:51.792283 | 2018-02-03T23:16:15 | 2018-02-03T23:16:15 | 120,138,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 982 | py | #Formatting
from datetime import datetime
def main():
# Times and dates can be formatted using a set of predefined string
# control codes
now = datetime.now() # get the current date and time
#### Date Formatting ####
# %y/%Y - Year, %a/%A - weekday, %b/%B - month, %d - day of month
print(" ")
prin... | [
"[email protected]"
] | |
f9808f85bde238a24b959b2f9ca94f6866dc7cf4 | 7f00fed1279c8f3a9dfca1830f087a666d59d195 | /EAD_project/financial_planner/portfolio_opt.py | 3f2e9522bc01326292a46e77825a06f50068fd71 | [] | no_license | hardy17g/Financial-Planner | fdca3f14604d3a6abfa78047b82cb4e2e5853e2a | 0b251339f5e2ec5357df447c9ad6b31ec92a3511 | refs/heads/master | 2022-04-24T18:59:47.812720 | 2020-04-30T17:19:17 | 2020-04-30T17:19:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 800 | py | import yfinance as yf
import pandas as pd
from pypfopt import EfficientFrontier
from pypfopt import risk_models
from pypfopt.risk_models import CovarianceShrinkage
from pypfopt import expected_returns
def get_result(l):
data = yf.download(tickers = l, period ="max", interval = "1d",auto_adjust = True)
data = da... | [
"[email protected]"
] | |
3247b9e144b72c1d8b6e61c1368ab3973f6c9b42 | 933266c87ce0cf45ccdf2a101fd2bf483dee7055 | /python/stack.py | 3fb2db57c11b117a4e5970f5a4442707df8decbe | [] | no_license | maddff/practice | 62cdcc59eec5c689a3361ce4291e23f19fd3692a | 365e3385653f1245f66bbcedc0b3080ca0a2dde0 | refs/heads/main | 2023-01-24T00:59:27.246004 | 2020-11-25T22:22:25 | 2020-11-25T22:22:25 | 309,238,543 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 659 | py | class Stack(object):
def __init__(self):
self.data_list = []
def insert(self, data):
self.data_list.append(data)
def pop(self):
if len(self.data_list) == 0:
return None
data = self.data_list[-1]
del self.data_list[-1]
return data
def size(self)... | [
"[email protected]"
] | |
0ec97c5ab8392c7cb7cdb4c1effd50efecf924ef | 474743374414f48e924919c524ad05534af94f9c | /nyCommuting.py | 32b8878bed161a5b2cc87e61982a1fac35ad5dda | [] | no_license | Perseus1993/nyMobility | aafbebcea28cd9950b329b967717b2d692960463 | 54b85a8638c5554ccad0c3c5c51e7695f1430ac7 | refs/heads/master | 2023-03-15T12:08:28.777956 | 2018-10-12T16:37:29 | 2018-10-12T16:37:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,756 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 5 17:25:14 2018
@author: doorleyr
"""
import pandas as pd
import json
from shapely.geometry import Point, shape
def get_location(longitude, latitude, regions_json, name):
# for a given lat and lon, and a given geojson, find the name of the f... | [
"[email protected]"
] | |
eb94a51b93a704547751ca94122f14ec027c77af | d91aa657b70768fd242796b2470b5e222c00a6c3 | /WriteOn.py | b371a8d81a8660168bd0c590ce25134a23c163fa | [] | no_license | dreshfield/WriteOn | 166b7d71ca538af8a753876b62f1bb8c22963b34 | 039b835b57bc614362341e1cd6c2c46015825309 | refs/heads/master | 2020-12-30T17:19:31.661035 | 2013-05-29T03:14:46 | 2013-05-29T03:14:46 | 2,522,300 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 711 | py | import curses, locale, sys, traceback
# Gets system's default encoding for non-ASCII chars; "code" is then used for str.encode() calls
locale.setlocale(locale.LC_ALL, '')
code = locale.getpreferredencoding()
"""
This is a documentation comment.
"""
# -- Key Bindings --
#
# Enter = switch between command/edit mode
#... | [
"[email protected]"
] | |
856794859aa4e34f0efcddebb80b7314f97f9f4c | 2c6e600de029d38478e3c4e4d4500d9a42b6dd98 | /End to End Multipli Disease Prediction/models/diabetes.py | 5b002b10b6b71b2d573735048b385db4a7fcbd6e | [] | no_license | githubybf/All-End-to-End-Projects | ae76434f49808a5076a5ec788f650c850b908cec | 40d0d5f1016c3c7b7e6457d697e6dc727f8c388c | refs/heads/main | 2023-03-07T09:07:19.289830 | 2021-02-07T08:06:08 | 2021-02-07T08:06:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 334 | py | import numpy as np
import pandas as pd
from sklearn.linear_model import LogisticRegression
import joblib
data=pd.read_csv("diabetes.csv")
print(data.head())
logreg=LogisticRegression()
X=data.iloc[:,:8]
print(X.shape[1])
y=data[["Outcome"]]
X=np.array(X)
y=np.array(y)
logreg.fit(X,y.reshape(-1,))
joblib.dump(logr... | [
"[email protected]"
] | |
f0714282ca1bed1a0bc706dfd5e96c9a2e87dc47 | a94770c70704c22590c72d7a90f38e3a7d2e3e5c | /Algo/Leetcode/123BestTimeToBuyAndSellStockIII.py | 2a292d28fef14431391bc62620bd69b4e46bf158 | [] | no_license | lawy623/Algorithm_Interview_Prep | 00d8a1c0ac1f47e149e95f8655d52be1efa67743 | ca8b2662330776d14962532ed8994dfeedadef70 | refs/heads/master | 2023-03-22T16:19:12.382081 | 2023-03-21T02:42:05 | 2023-03-21T02:42:05 | 180,056,076 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 409 | py | class Solution(object):
def maxProfit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
buy1 = -2**31
buy2 = -2**31
sell1 = 0
sell2 = 0
for p in prices:
buy1 = max(buy1, -p)
sell1 = max(sell1, buy1+p)
... | [
"[email protected]"
] | |
4dceb544e9e5cb1d823f903dc4ef905e43deca34 | 264ff719d21f2f57451f322e9296b2f55b473eb2 | /gvsoc/gvsoc/models/pulp/fll/fll_v1.py | 4bba0a37a2e965a05864f2ac8ec5e53627d4f934 | [
"Apache-2.0"
] | permissive | knmcguire/gap_sdk | 06c9537c16fa45dea6b7f5c6b162b53953262915 | 7b0a09a353ab6f0550793d40bd46e98051f4a3d7 | refs/heads/master | 2020-12-20T06:51:19.580497 | 2020-01-21T14:52:28 | 2020-01-21T14:52:28 | 235,992,961 | 0 | 0 | Apache-2.0 | 2020-01-24T11:45:59 | 2020-01-24T11:45:58 | null | UTF-8 | Python | false | false | 772 | py | #
# Copyright (C) 2018 ETH Zurich and University of Bologna
#
# 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... | [
"[email protected]"
] | |
5bdcfc70c667b06dfdae9f296ca3cab66c8be15a | 1f1c5ffab001852677030e1fd745d6ac426554ad | /C07_enum.py | c8ecc91ac600ea10173f3b256ce6fcdd2eb05b33 | [
"MIT"
] | permissive | k501903/pythonstudy | be4c0b714d2d0b661efbfa50c4c12cb1bb84ebd6 | f4eff76819cec2c479ec19a4940141406079cb9a | refs/heads/master | 2021-09-06T20:55:49.222865 | 2018-02-11T07:54:57 | 2018-02-11T07:54:57 | 111,904,266 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 634 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'枚举类的练习'
__author__ = 'Jacklee'
# 导入模块
#import types
# 月份常量
JAN = 1
FEB = 2
MAR = 3
# 枚举类
from enum import Enum, unique
## 第一种定义方式
@unique
class Month(Enum):
JAN = 0
FEB = 1
MAR = 2
## 第二种定义方式
WeekDay = Enum('WeekDay', ('Mon', 'Tue', 'Wed', 'Tru', 'Fri', 'Sat', '... | [
"[email protected]"
] | |
8d68dee440c678f91456f3f192d90e117ad537bf | 3010e34c624c55b55b4264c33ac28f639c241233 | /metareader/metadata_format.py | 729e3b70324f612360358a74ad521074eecfddf6 | [
"MIT"
] | permissive | valossalabs/metadata-reader | dfd29cc4654e6334f70260a0215987ca260f9262 | 3e7a6c06f12f27714ec89413d0d0acf13f0e07a3 | refs/heads/master | 2021-07-18T07:43:55.219251 | 2021-02-12T18:21:39 | 2021-02-12T18:21:39 | 94,876,117 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,771 | py | # -*- coding: utf-8 -*-
"""metadata_format.py"""
# The newer version has all fields in earlier versions
# TODO: Update to current version
metadata_versions = {
"1.3.2": {
"detections": {
"ID": {
"a": {
"similar_to": [{
# Is this correct:... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.