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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a7e83fe9528b177246d6374ddaf2a76a0046e83 | 9a7cd3ec21958a07e043f2c488f3632e07e2829a | /Similarity_Compare.py | f290d1b678af402144bd011d2fe6054f9f0d2ebe | [] | no_license | SAXEM1997/SIRC | ba11a55c12ba8770443a241ce769ab9c09ad9cca | fd8ca17b11f195e28501062535bdbc9c066be9d9 | refs/heads/master | 2020-03-16T09:13:06.358962 | 2018-05-20T19:08:44 | 2018-05-20T19:08:44 | 132,611,395 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,066 | py | Similarity_Compare.py | # coding:utf-8
import jieba
import os
import sys
import math
reload(sys)
sys.setdefaultencoding('utf-8')
from sklearn import feature_extraction
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import CountVectorizer
#import csv
#import pandas
#import numpy
sente... |
7e7e96fb9377e4dc59a46a46951f5057ecae419a | 21d9843d89b19dbed13e6965f20e055165ea3de0 | /test.py | dd8f90de392b399866734f8088ed594d23e2eacc | [] | no_license | saimukund303/python_robot_arm | 38ac54f1ef4978806d5b185b5202df5dcba24324 | 37de010f665e4777121868fef92a7f8aa8c06772 | refs/heads/master | 2021-10-26T08:32:37.945692 | 2019-04-11T13:29:10 | 2019-04-11T13:29:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 494 | py | test.py | # -*- coding: utf-8 -*-
import random
import gym
import numpy as np
from collections import deque
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import Adam
from simulation_utils import box, simulation
from kinematics import pose3D
a = np.log(2)/25
apdataX = np.random.random(... |
b6183daa943cc63fd2959e3e54fc1e6af5d761de | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/393/usersdata/341/73602/submittedfiles/swamee.py | 9b9475630dfecaca1447cfd3a2a7fad60c79fedd | [] | 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 | 596 | py | swamee.py | # -*- coding: utf-8 -*-
import math
#COMECE SEU CÓDIGO AQUI
f = float(input('Digite o valor de f: '))
L = float(input('Digite o valor de L: '))
Q = float(input('Digite o valor de Q: '))
DeltaH = float(input('Digite o valor de DeltaH: '))
v = float(input('Digite o valor de v: '))
g = 9.81
e = 0.000002
#PROCESSAMENTO
D =... |
1490fecd6e983c0e3093a45d77d6fb8afdb54718 | d78085f724f11e9a8ba3b1646903b4ee25f59600 | /main.py | eebf17099fee9e9f7061ce356a90a48f229d835e | [] | no_license | rpaudel42/SnapSketch | 2721abcc63c68de68ef4593f239eca6425201f35 | 8dded76865af7bdd22bc9db63a78ae0152b03c80 | refs/heads/master | 2022-06-12T10:00:46.733525 | 2022-05-18T13:44:34 | 2022-05-18T13:44:34 | 234,449,123 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,195,982 | py | main.py | # ******************************************************************************
# main.py
#
# Date Name Description
# ======== ========= ========================================================
# 6/5/19 Paudel Initial version,
# ***********************************************************************... |
e5d7cc65041d65f915d4882b4fdad5bebf79a067 | ba74b16961d4ae882d73577701ee39732ff81d14 | /nmt/datasets.py | d646d9524d7bdecbfe9e43946711c5a60a0e3d28 | [] | no_license | macmackiewicz/neural-machine-translation | 8015e7a45ab0370e9ed5950662fcb929f550a61b | cc52facf6903077bd6bc3b27ed7defc0f71de48d | refs/heads/master | 2023-04-03T04:26:13.608132 | 2019-09-08T17:19:52 | 2019-09-08T17:19:52 | 182,391,947 | 0 | 0 | null | 2023-03-24T22:43:46 | 2019-04-20T10:27:46 | Python | UTF-8 | Python | false | false | 5,312 | py | datasets.py | from collections import defaultdict
from typing import Union, Iterable, Sized
import numpy as np
from cached_property import cached_property
from keras.utils import to_categorical
from keras.preprocessing.sequence import pad_sequences
from keras.preprocessing.text import Tokenizer, text_to_word_sequence
class Source... |
e221553f866de8b3e175197a40982506bf8c1ef9 | 8ef937b2943942ecb2051c9e96a7b567b7386115 | /test_multi.py | 138cd392780c79838800722038d0dbdc784dcaaf | [
"MIT"
] | permissive | det-tu/HFTP | 968dac75983a36e4cb831fc72d1c3f4b381fd321 | b43a588aae7af1cf37ceed3403f7a0d873d1e34c | refs/heads/master | 2020-04-11T18:44:40.266333 | 2018-12-15T07:33:46 | 2018-12-15T07:33:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,515 | py | test_multi.py | import torch
import torch.nn.functional as F
import csv
class Net(torch.nn.Module):
def __init__(self, n_feature, n_hidden, n_output):
super(Net, self).__init__()
self.hidden = torch.nn.Linear(n_feature, n_hidden)
self.predict = torch.nn.Linear(n_hidden, n_output)
def forward(self, x... |
39dda191ab2137b5f5538660f17e39b0a1358bf4 | eaa73a19933e36fe4fb72dba588accfe81bf955e | /Book_IP/python/Watershed_coins.py | 642fecf77798329440cf37fdb265cd70da90c476 | [] | no_license | vegkams/Computer-vision-TDT4265 | 25cae91615126a4f72ebc84c78690c8b65c4216f | d70bc9d51fd8a02d1f0df78b3212fd80b4e95a8c | refs/heads/master | 2021-01-19T12:26:00.815177 | 2017-04-24T08:49:24 | 2017-04-24T08:49:24 | 82,305,429 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,335 | py | Watershed_coins.py | import numpy as np
import cv2
import colorsys
from matplotlib import pyplot as plt
img = cv2.imread('coins.jpg')
b,g,r = cv2.split(img)
rgb_img = cv2.merge([r,g,b])
gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
# Blurring image
grayBlur = cv2.medianBlur(gray, 3)
# Binary threshold
ret, thresh = cv2.threshold(grayBl... |
0e6e84a31b626639e2aa149fd1ef89f3ef251cd7 | 2cbcf2fcfd904c4c6214fda302099b7b1a8c4777 | /synda/tests/context/version/models.py | 6ea2990766a811a9737d882c3bb1b384fe1f9842 | [] | no_license | ESPRI-Mod/synda | d2d6f06d1c2fe142159f795a5dc2a923c4016f2b | 80554e2393de92b642d0b0385a3cfb055a736678 | refs/heads/master | 2023-05-23T21:15:33.602609 | 2021-05-07T09:49:23 | 2021-05-07T09:49:23 | 19,697,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,031 | py | models.py | # -*- coding: utf-8 -*-
##################################
# @program synda
# @description climate models data transfer program
# @copyright Copyright "(c)2009 Centre National de la Recherche Scientifique CNRS.
# All Rights Reserved"
# @license CeCILL (https://raw.g... |
c0d71d970b2632dbf182a5ee8bad27d3e41578f6 | 7c49a4dbe8657cb77092c41ae28eb71cad474157 | /Day1/Day1.1.py | c10ee572110fcc4d74b542f1cacfaf78de018965 | [] | no_license | JakeFeiler/AdventOfCode2018 | 70d8df7f1629ccfef6bc17466fdff1b2539e6acd | c71f160940b1b37ed5be0c5a8452b5d4b49f7eaa | refs/heads/master | 2020-04-10T09:07:47.146833 | 2018-12-24T01:52:42 | 2018-12-24T01:52:42 | 160,926,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | Day1.1.py | #!/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
import sys
def sumInput(text):
f = open(text, 'r')
sum = 0
count = 1
for line in f:
count += 1
line = line.strip()
if (line[0] == '+'):
sum += int(line[1:])
else:
sum -= int(line[1:... |
f14d46bedd5f6e0081a982251ad45e95860ef310 | a5a06753a4d7b7f7e7144115f64dfa2f615e5f8f | /exercicio4/exercicio4.py | edfd7bda7af3657ff21f86c96df508438bb5597f | [] | no_license | GustavoLeao2018/correcao-prova-jeff | aba0b2212c0adce11a59596c9ce06dac21774aa0 | bf2d402758fe79f52ccba6ee47ad77c6a62eb3f3 | refs/heads/master | 2020-06-09T21:06:38.077970 | 2019-06-24T12:58:26 | 2019-06-24T12:58:26 | 193,505,987 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 368 | py | exercicio4.py | class HashTable:
def __init__(self):
self.dados = []
def hash(self, chave):
return int(chave)
def __put(self, int, chave, valor):
self.dados.append({chave: valor})
"""
backup = dados
dados = novo_array(t * 2)
for elemento in backup:
hash = hash(elemento.chave)
__put(... |
ed01bc642577ff21240bbe56a00e63a59de98ebd | 6fd7160feca4ddc6f008fd13c993f5b1cbde240c | /module/wiki.py | 7bedffcdf165a0fb2d46fd7dbef778992b6b0a48 | [] | no_license | Vanyanumber7/bot_project | 35d7ac98455394cbd905b7988a445ee4b05797bb | fe39402497fa19b1b05550edd68189d454388cb8 | refs/heads/master | 2023-04-18T19:28:30.703283 | 2021-05-01T15:28:59 | 2021-05-01T15:28:59 | 361,000,147 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 321 | py | wiki.py | import wikipedia
def wiki(text):
# взятие информации из википедии
try:
wikipedia.set_lang("ru")
ny = wikipedia.page(text)
except wikipedia.exceptions.DisambiguationError:
return False
wiki_data = (ny.content.split('\n')[0], ny.url)
return wiki_data |
8b6727dc989c46ab8d90090e758b229c56d5725f | 1ea01f21bc31304472f2a041f99822b25f33c360 | /HackerEarth_ML2_June2017/ml2_xgb_count_vectorizer.py | 6c9ba8e0a7d2eae3afd261458b987496023ccf98 | [
"MIT"
] | permissive | supreethmanyam/MachineLearning | d93249cdd67d469b8c940aefd133f4c08074f13d | ba8954e356e819e277ef8645b0c51ae22a4680f3 | refs/heads/master | 2022-01-19T18:16:02.949384 | 2019-05-07T13:54:31 | 2019-05-07T13:54:31 | 70,143,806 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,424 | py | ml2_xgb_count_vectorizer.py | import pandas as pd
import numpy as np
import xgboost as xgb
from sklearn.preprocessing import LabelEncoder
from scipy.sparse import hstack
import string
from sklearn.feature_extraction.text import CountVectorizer
from scipy.sparse import csr_matrix
translator = str.maketrans('', '', string.punctuation)
train = pd... |
7e5c51aee59eaadd6d8e6361584b23085e6ff664 | 54adeafff117fb1ef0288022b639b18e5527af6c | /wisec21_nrf51_ble/first.py | 22523ba25dd42937efb8c523f15f29146aa6405f | [] | no_license | avatartwo/avatar2-examples | 5eaa9642f03b1bee8dec1de01a26641401866ca8 | 056c8ef7940c911d66fc66aec8a7454e334106bf | refs/heads/master | 2023-04-13T05:41:31.202191 | 2023-04-09T20:31:26 | 2023-04-09T20:31:26 | 95,566,266 | 23 | 14 | null | 2023-04-09T20:31:28 | 2017-06-27T14:18:50 | Python | UTF-8 | Python | false | false | 865 | py | first.py | from avatar2 import Avatar
from avatar2.archs import ARM_CORTEX_M3
from avatar2.targets import OpenOCDTarget
avatar = Avatar(arch=ARM_CORTEX_M3, output_directory='/tmp/avatar2')
# Specify Targets
nrf = avatar.add_target(OpenOCDTarget, openocd_script='/usr/share/openocd/scripts/board/nordic_nrf51_dk.cfg')
# Add memor... |
4ba26113ca59b9ce8974c28883d9aa0e3d7c8de9 | 965bc841a4a13407ced203773b3d1817606b8f44 | /base/base_action.py | 5aa120c5666f9303877acee495d3303aafe7f87a | [] | no_license | chenpushigehaorenyes/po | 4f5c33ecb7d0f91c516b4dc1fd7ca5eb024759b4 | 8d514a79b76ef134b22b8d1129f3a2aa9b7e6c6d | refs/heads/master | 2020-06-10T05:59:57.849954 | 2019-06-25T00:37:26 | 2019-06-25T00:37:26 | 193,602,825 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 513 | py | base_action.py | from selenium.webdriver.support.wait import WebDriverWait
class BaseAction:
def __init__(self, driver):
self.driver = driver
def find_element(self, feature,timeout=10,poll=1):
feature_by, feature_value = feature
return WebDriverWait(self.driver,timeout,poll).until(lambda x:x.find_eleme... |
d663b4ae4f2ac0da59a70705f66812f5e9355c8a | 77b16dcd465b497c22cf3c096fa5c7d887d9b0c2 | /Horan_Colby/Assignments/stars.py | 7450e88ae12e83d2abfd04c3803b70b2484e5808 | [
"MIT"
] | permissive | curest0x1021/Python-Django-Web | a7cf8a45e0b924ce23791c18f6a6fb3732c36322 | 6264bc4c90ef1432ba0902c76b567cf3caaae221 | refs/heads/master | 2020-04-26T17:14:20.277967 | 2016-10-18T21:54:39 | 2016-10-18T21:54:39 | 173,706,702 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | stars.py | # Part 1
#print 'Enter a list of at least 2 numbers seperated by commas:'
#x = input()
#def draw_starz(x):
# count = 0
# while (count < len(x)):
# print x[count] * '*'
# count += 1
#draw_starz(x)
# Part 2
y = [4, 'Tom', 1, 'Michael', 5, 7, 'Jimmy Smith']
def draw_starz2(list):
for x in list:
output = ''
if t... |
329c295aa6f7d7fac35634bcab1c32601984f71e | 970bae8b24640030baefbfa61a5a803a27e0b2ea | /model.py | 3df5c0acb3b472f9da74d2c35a6f9824abb398bf | [] | no_license | charlenenicer/credible-clients | b4f5217be64feb44bba922836320ca6e46722041 | f32ff9abf57c553dd13e7d6b4f4e7c684b462852 | refs/heads/master | 2020-04-14T15:42:28.502603 | 2019-01-03T22:52:26 | 2019-01-03T22:52:26 | 163,935,309 | 0 | 0 | null | 2019-01-03T07:00:09 | 2019-01-03T07:00:09 | null | UTF-8 | Python | false | false | 1,569 | py | model.py | import numpy as np
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.neural_network import MLPClassifier
from sklearn.linear_model import SGDClassifier
from sklearn import svm
class CreditModelDecisionTree:
def __init__(self):
self.model = Decis... |
3a6129dd21b8f2e05d3f513d2fbde10920f83407 | d1b133d1c1ee1574714e6a92df21c2e685d86971 | /properties/migrations/0007_auto_20210424_0555.py | 8961f468d3a38896ccd63599e84977b35ad1e345 | [] | no_license | Groompel/Shanyrak | a6faff36ccbe648c7b99a03583ede67a998ef278 | acaed73af5ead1feb07805b7ecaceb4a50557e05 | refs/heads/master | 2023-04-22T02:23:52.466686 | 2021-05-16T13:06:23 | 2021-05-16T13:06:23 | 356,476,366 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 593 | py | 0007_auto_20210424_0555.py | # Generated by Django 3.1.7 on 2021-04-24 05:55
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('misc', '0004_delete_room'),
('properties', '0006_auto_20210424_0554'),
]
operations = [
migrations.... |
bb25c2e2bddefef93c04d84b7ad6a91f6ea9bce9 | 7422aac3bd14931886698d526578c8fdda83278a | /urlhandler/adminpage/__init__.py | a266e9b8cc6e9b9c255a5a68bfc61125a912f222 | [] | no_license | Wang-Yuwei/WeChatTsinghuaTuan | 7fcd1fb9ac8159b06ea108dc6e91e91f76751b33 | 035a63bc92c906f483992a892c60474ac1cadf99 | refs/heads/master | 2021-05-28T05:57:04.303277 | 2014-11-08T14:04:48 | 2014-11-08T14:04:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24 | py | __init__.py | __author__ = 'Epsirom'
|
2516bacb540718d0f44ec3904b6c8b13c99245d6 | 8959202ea1a1af9f9f184b712ace30a047594ddc | /bigStars.py | 39f6c6b705dee3472ce5340950a3e541cd2b6d6b | [] | no_license | juliadod/game | 2d63f720eb36c851859b6580930a7b4c51651b3b | adbf3df62677ec314140dcfb1d4a6f73b5a2df72 | refs/heads/main | 2023-03-16T04:10:38.662193 | 2021-03-01T07:32:31 | 2021-03-01T07:32:31 | 341,600,942 | 0 | 0 | null | 2021-03-01T02:09:27 | 2021-02-23T15:32:56 | null | UTF-8 | Python | false | false | 905 | py | bigStars.py | import pygame
import colors
class BigStars:
big_hollow_star = pygame.image.load('resources/images/big_hollow_star.png')
big_filled_star = pygame.image.load('resources/images/big_filled_star.png')
def __init__(self, score):
self.score = score
def draw(self, surface, rect):
if (self.... |
f918d690897c29b0f3607b3840d20229d1992b6c | 2ccedbd8c3ec3867b8ede382d374692558fc33bf | /src/8_largest_product_in_a_series.py | a3e45efbe759e9f7cc8d118bce520d08150141e9 | [] | no_license | datvithanh/project-euler | c42f821c7e602cc4b3121992d6183155dd89b0b5 | 08f1a50419f0cdaaee494beeb0167a8980e7b1dd | refs/heads/master | 2022-11-17T04:13:38.444200 | 2022-11-16T05:39:40 | 2022-11-16T05:39:40 | 180,776,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,146 | py | 8_largest_product_in_a_series.py |
from numpy import prod
s = [int(x) for x in "7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362... |
a815faefdf208ee9869b91a769d3d3ea2402520f | f64e31cb76909a6f7fb592ad623e0a94deec25ae | /tests/test_p1646_get_maximum_in_generated_array.py | e833835a8e169272999b9a8b8860795c91945b58 | [] | no_license | weak-head/leetcode | 365d635cb985e1d154985188f6728c18cab1f877 | 9a20e1835652f5e6c33ef5c238f622e81f84ca26 | refs/heads/main | 2023-05-11T14:19:58.205709 | 2023-05-05T20:57:13 | 2023-05-05T20:57:13 | 172,853,059 | 0 | 1 | null | 2022-12-09T05:22:32 | 2019-02-27T05:58:54 | Python | UTF-8 | Python | false | false | 363 | py | test_p1646_get_maximum_in_generated_array.py | import pytest
from leetcode.p1646_get_maximum_in_generated_array import getMaximumGenerated
@pytest.mark.parametrize(
("a", "expectation"),
(
((7), (3)),
((3), (2)),
((30), (8)),
((0), (0)),
((1), (1)),
((2), (1)),
),
)
def test_solve(a, expectation):
as... |
6d7d5266fca1700e80354ae7c284c4dd8706a0a7 | 275a2e10c0144c3e665d985233d46f46ba81d631 | /coredotfinance/krx/core/option.py | 05527afcd162ca108bfed83ce7a6398d7cefab92 | [
"Apache-2.0"
] | permissive | DavidKimDY/CoreDotFinance | 5be139709543a0afd71d65f4a7a3e8a94e4bb883 | e91a56702b832b8ed174850df70cb1555ce09054 | refs/heads/master | 2023-08-18T16:48:22.378855 | 2021-09-13T07:01:58 | 2021-09-13T07:01:58 | 363,844,104 | 0 | 0 | Apache-2.0 | 2021-09-13T02:51:31 | 2021-05-03T07:01:47 | Java | UTF-8 | Python | false | false | 2,928 | py | option.py | import json
import re
import warnings
import os
import pandas as pd
def get_shares_volume_column(columns):
for shares_column in ['상장주식수', '상장좌수', "shares_outstanding"]:
if shares_column in columns:
shares = shares_column
break
else:
shares = None
for volum... |
e56e22c7acf6a3b0bfea67abcfa188165afac11e | bdfc67fcf49ee825a8ac1c7adf8a06723f15fc6d | /qixinbao/request_demo.py | 012e87ae4eeeddfaed4ae9fef7a020735eeb6857 | [] | no_license | janusna/anti_sign | 5d51c9e0024f2d9d7be18953190a9657254e94b3 | f404f947bc3704b0ba0f7b43c330c4e9c8a7f8d0 | refs/heads/master | 2023-06-02T16:13:44.712436 | 2021-06-15T03:30:00 | 2021-06-15T03:30:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,159 | py | request_demo.py | import hmac
import json
def create_salt(arguments):
"""生成hmac的盐"""
map_table = {0: "y", 1: "1", 2: "A", 3: "H", 4: "A", 5: "P", 6: "m",
7: "s", 8: "y", 9: "C", 10: "x", 11: "R", 12: "M",
13: "Q", 14: "D", 15: "c", 16: "y", 17: "C", 18: "V", 19: "S"}
arguments = arguments.lo... |
e050d4cbbf3d8b9f3657ff8b6ae80a8445470afb | 8214e4c4ef944cf106ea55adcf9cc19fcc1cd94b | /evalhand.py | 03fcf96a49bf73692fc9115579bed0376e5d148f | [] | no_license | wacalore/nn-nlhe | 2ee0b8f564da12d1ae0247de1e7a0ad1775ac9f9 | 6662cb18da45bcff7a2cf73e3cd3ca3aa7ba1777 | refs/heads/master | 2021-01-21T11:00:07.384334 | 2017-03-23T03:35:00 | 2017-03-23T03:35:00 | 83,511,408 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,037 | py | evalhand.py | import pandas as pd
rankvalues = dict((r, i)
for i, r in enumerate('..23456789TJQKA'))
def eval_hand(hand):
hand = hand.split()
suits = [s for r, s in hand]
ranks = sorted([rankvalues[r] for r, s in hand])
ranks.reverse()
flush = len(set(suits)) == 1
straight = (max(ranks)... |
452050dab8e6ab80ecf3426876b1fadbf5bc9106 | 6115a56199af681e8e422d7d9a8f50f0e1c74713 | /kura_kura.py | a4b8f519d079eed687581c3fcb168ab57cd25748 | [] | no_license | guy-py/turtle-coder | 76c758205b88466c68636841e8757e09ff4b51e2 | f5e3fbe4e1bae66676b6e9573d99a37874a17484 | refs/heads/main | 2023-05-11T06:28:02.118082 | 2021-06-05T06:23:39 | 2021-06-05T06:23:39 | 374,037,435 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,082 | py | kura_kura.py | from turtle import *
reset()
def _forward(ins):
j=[]
for i in ins:
j.append(int(i))
forward(sum(j))
def _backward(ins):
j=[]
for i in ins:
j.append(int(i))
backward(sum(j))
def _right(ins):
j=[]
for i in ins:
j.append(int(i))
right(sum(j))
def _left(ins):
... |
8158ee6416c8815805e7a6391692df550c54cb4b | 7193be8e52b2095d8b6472f3ef2104843dca339e | /Project5-Capstone/the_dummy_variables/josh/scripts/create_submission_solution.py | b5b43d0d79df43876fc8fa62f78da7675c72e7be | [] | no_license | vuchau/bootcamp007_project | 4b0f37f49a1163ea6d8ee4143a5dcfdef0d352dd | ffbd0f961b18510fc72fd49770187ec1b4b013ae | refs/heads/master | 2020-03-20T13:19:58.812791 | 2017-06-08T05:13:24 | 2017-06-08T05:13:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,108 | py | create_submission_solution.py | #!/usr/bin/env python
"""
This script converts the user-song-count file to the kaggle
submission format for easy comparison.
"""
import os
dirname = os.path.dirname
abspath = os.path.abspath
join = os.path.join
# Path to project
# Assumption is that the project is one directory up
path_to_project = dirname(dirname(ab... |
82325571cc3e9016636805e414dfb9723321c99e | 6b0ca4ece69cb52c30228395d8201137028605eb | /python/081-090/Remove Duplicates from Sorted List II.py | 1275447de9c039cdb9d594660edcc8c07a0c7df3 | [
"MIT"
] | permissive | gzc/leetcode | d8245071199e1b6321856ba0ddbdef5acfb5b2ac | 1a604df1e86c9775b8db364bfb3a5462ed96e9d0 | refs/heads/master | 2022-02-04T00:12:19.448204 | 2022-01-30T03:08:14 | 2022-01-30T03:08:14 | 32,258,529 | 178 | 68 | MIT | 2021-03-28T16:50:18 | 2015-03-15T12:04:59 | C++ | UTF-8 | Python | false | false | 602 | py | Remove Duplicates from Sorted List II.py | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
# @param {ListNode} head
# @return {ListNode}
def deleteDuplicates(self, head):
nhead = ListNode(0)
prev = -2**31
res = nhead
... |
ce3bf9f34717331dc7e243e6c4c831ee64bf0c97 | 77e6dcf99ae51f8040fca9d36468e4f316c6f167 | /dataset.py | 981c288ee05867269f6b847e620c033f4f29cb55 | [] | no_license | pandeynandancse/text-extraction-QnA-BERT | 61c4608cf4b2caf42e74f78da94b1c310f65abde | d765162d37393a90d7b7c05a74611029cd598797 | refs/heads/master | 2022-11-24T04:05:20.416123 | 2020-08-07T15:28:15 | 2020-08-07T15:28:15 | 285,763,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,893 | py | dataset.py | import config
import torch
import numpy as np
import pandas as pd
class TweetDataset:
def __init__(self, tweet, sentiment, selected_text):
self.tweet = tweet
self.sentiment = sentiment
self.selected_text = selected_text
self.tokenizer = config.TOKENIZER
self.max_len = con... |
11b0ebe229c805dd021c5cd5e76e583717113ea5 | d655b272fc10e42981624c6c090e1ef7c4fc35ce | /singateway/utils/json.py | 1302db97e3e0ed6c1a635f8170853c500b7db0e6 | [
"MIT"
] | permissive | StartITBot/sinGateway | e666255348627f5837704d811ad219fa32761841 | 89b52cf6973791fdef173de854cd5f76884a2a9b | refs/heads/main | 2023-05-04T18:56:21.807000 | 2021-05-29T17:39:03 | 2021-05-29T17:39:03 | 339,052,654 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 234 | py | json.py | try:
import ujson
except ImportError:
import json
def to_json(obj):
return json.dumps(obj, ensure_ascii=True, separators=(',', ':'))
else:
def to_json(obj):
return ujson.dumps(obj, ensure_ascii=True)
|
2116deff58a88b617a73e19c13290494686e9835 | 0a4c6cfd5e18b18b8e9b7f6590b5aa2f0d343bb2 | /routes/url.py | db253ccfe2768340522afd3f1b969f4bdb43dabf | [] | no_license | FantWings/short_url | 2d5660322f5550392f6d6351b1d82a7dece77bbb | b56e8ef03b15b1f578ebade893913a7491f6894f | refs/heads/master | 2023-05-21T22:30:20.151967 | 2021-05-12T17:55:50 | 2021-05-12T17:55:50 | 358,496,360 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,049 | py | url.py | from flask import Blueprint, make_response, request
from lib.interface import response
from sql.model import db
from sql.tables.t_url import t_url
from lib.gen import genToken
from lib.redis import Redis
url = Blueprint('url', __name__)
@url.before_app_request
def get_userid():
global userid
userid = Redis.... |
4c3e40b4794818638796f7fba60fc0e59a9677f4 | 2357fe6b2e63abd370b62749ac391cabca071927 | /client.py | 0243830457203703723d06d617eef82d6d70477d | [] | no_license | feroz2017/Simple-Internet-Download-Manager-IDM | b1af0c2849d948364b555cc949ca78708bea2c4b | 5fb47adb9ea6a5e0a0965203549a9d01573b9235 | refs/heads/master | 2021-01-07T19:12:02.791295 | 2020-02-20T04:36:20 | 2020-02-20T04:36:20 | 241,793,000 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,094 | py | client.py | import sys
import threading
import socket
import argparse
import signal
import os
from tqdm import tqdm
import shutil
#os.mkdir("/root/IDM/A")
count = 1
# Making Custom Thread
os.makedirs("/root/IDM/A", exist_ok=True)
videoParts = []
lock = threading.Lock()
class myThread(threading.Thread):
def __init__(self,i... |
2722e21691dc4e323cab4b4bbf6dacfd1c756b9c | bf3515b34df5c45799e28b53b44ea5acf18d1739 | /Diccionarios - Valores de tipo listas, tuplas y diccionarios/Problema1.py | 4a98071e5b2c01358f187bf17bf08d24792e09fb | [] | no_license | ignaciorosso/Practica-diaria---Ejercicios-Python | d36d1b73cee3b005f76806d8b0820a2e7acfd40d | 288b70c1b711c532d3f9ebf8d947ac988acd14c1 | refs/heads/main | 2023-08-25T17:20:45.750632 | 2021-11-02T21:50:54 | 2021-11-02T21:50:54 | 412,233,567 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,649 | py | Problema1.py | # Confeccionar un programa que permita cargar un código de producto
# como clave en un diccionario. Guardar para dicha clave el nombre del producto,
# su precio y cantidad en stock.
# Implementar las siguientes actividades:
# 1) Carga de datos en el diccionario.
# 2) Listado completo de productos.
# 3) Consulta... |
a047904d34255182531f32681799649cea6e082e | 88f5239dbcd0cb078e7e5fc46d7c238793059a42 | /string.py | af4c5b6f7f80b89ca0c2b5ad0d27ddaa0db2cf11 | [] | no_license | simhateja7/simha | 38b324623bdd15d8157af148407f57558f768a31 | 355358e94fd535f37852e7053f11633d9e7fb0af | refs/heads/master | 2023-08-27T16:31:55.280994 | 2021-10-12T19:01:11 | 2021-10-12T19:01:11 | 291,062,205 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | string.py | def most_frequent(string):
count_letters = {}
for letter in set(string):
count_letters[letter] = string.count(letter)
sorted_keys = sorted(count_letters,key=count_letters.get,reverse = True)
print(sorted_keys)
for i in sorted_keys:
print(i,'=',count_letters[i])
... |
084ccfc5ffcd100f2f98fb3e75c4f6b676d5d3f8 | 09d4c110161520c2ed8bab9f19e2a07f23d66b46 | /wordvector/migrations/0002_auto_20161031_0252.py | 0f0e11ca6dc638d5054b1f4a4c29c7e564bcdd13 | [] | no_license | lunrongchen/SWR | 0565df4d62b4198d9dabcc7de760f78e9ff43c7e | fd5cc45e1351b20f7b09ea1c82ddb3bc14930575 | refs/heads/master | 2021-01-12T14:09:08.125125 | 2016-11-07T16:51:24 | 2016-11-07T16:51:24 | 69,759,201 | 1 | 0 | null | 2016-11-05T17:12:50 | 2016-10-01T19:34:08 | Python | UTF-8 | Python | false | false | 928 | py | 0002_auto_20161031_0252.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wordvector', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='WordVectorFile',
fields... |
906ed34472cc580e5c879667a42af435049fb81a | eabf837c3e6835902b6f1b091a56e5ac7dc4d5e6 | /competition.py | 968ea5dc6b0c3dcd40312182b5971c550bf586b9 | [
"MIT"
] | permissive | lauren-lopez/learning_python | 0bc91f4ab83bb55c498fcc00993a8cd1558d34e1 | c91bcf2e6468a3dd0f4e8a928d2c0de1e5706ade | refs/heads/master | 2022-09-18T01:45:49.126678 | 2020-06-02T01:20:37 | 2020-06-02T01:20:37 | 252,596,240 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,831 | py | competition.py | #!/usr/bin/env python3
# Modify entropy_fast() however you like to make it faster
# Ideally, your method is faster at all ranges of window size
import math
import time
import random
def entropy_slow(seq, w, th):
t0 = time.perf_counter()
low_H_count = 0
for i in range(len(seq) - w + 1):
win = seq... |
e64098f12cd5e93205a88af79c2813983cb40568 | 90eba8b87e5d62fb38149fe8ca4a46a5f3c6ddc9 | /src/monkeypatch.py | e37836cc63d19ce1857c43628531d35e2bc88f79 | [
"Apache-2.0"
] | permissive | phoeagon/monkeypatching-python | 9a5c0064b6ab031b25482db20795c2419fa75c12 | 915c88aa218b2e4c799628284b7e128c7242cbd1 | refs/heads/master | 2021-01-25T08:29:48.955974 | 2015-06-18T15:57:43 | 2015-06-18T15:57:43 | 37,650,296 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,979 | py | monkeypatch.py | #!/usr/bin/python
# Filename: monkeypatch_test.py
import re
import logging
from collections import defaultdict
try:
import exceptions
except:
exceptions = type('Exception', (), {'AttributeError': AttributeError})
__resolve__ = defaultdict(dict)
__pending_resolve__ = {}
def _bypass(attr):
return attr in ... |
850bb88c9c9394e13986d7963df016b9d8660e6c | 0425cb99beb518d3ec99104f46327ead1e44a5a6 | /tensorflow_transform/beam/analyzer_cache.py | e32a6abb48b3becaed2a48455e3af5015af52c46 | [
"Apache-2.0"
] | permissive | Saiprasad16/transform | 272920899473fdafad39e39e9438705f4ed97a7c | 774458bf0c296f8275fedf3ace303427654dace7 | refs/heads/master | 2023-04-24T17:07:12.463502 | 2021-05-06T18:30:11 | 2021-05-06T18:30:38 | 366,010,023 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,494 | py | analyzer_cache.py | # Copyright 2018 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 a... |
964c3095f1e8bd09b5b2e6bf0437100594d2a580 | 79732fa5d9c93e1362cbad8cfcb5f5d31fae596c | /ransom_note.py | 225f5bd2f23d886a03bd39c96aeeeb9a1a5fb92b | [] | no_license | poppindouble/AlgoFun | c4bb78ab9338b8b685ae8b27b55de6a62862495c | f35c61b715cd436c99037c4e6ed824dfcba3ec15 | refs/heads/master | 2021-09-10T05:52:08.666243 | 2018-03-21T09:38:55 | 2018-03-21T09:38:55 | 112,266,753 | 1 | 0 | null | 2018-02-21T22:28:42 | 2017-11-28T00:54:16 | Python | UTF-8 | Python | false | false | 368 | py | ransom_note.py | from collections import Counter
class Solution():
def canConstruct(self, ransomNote, magazine):
myDict = Counter(magazine)
for char in ransomNote:
if char not in myDict:
return False
if myDict[char] == 0:
return False
myDict[char] -= 1
return True
def main():
print(Solution().canConstruct("a... |
621c3d897814208a643f0a6ad9305ada1d2722ea | c97e1b6f2bff804af848bc90a9ea4f08f9ec004f | /gorm/reify.py | 5dc87c563a4a5f2452e71bf117df77aded54e142 | [
"BSD-2-Clause"
] | permissive | eneas193933/gorm | 7b67a82b293ed465612a00c8593b6b7dfc358974 | af9ba285b597eac83aa9722664cd8da35c4a03c5 | refs/heads/master | 2021-01-24T22:28:27.919279 | 2015-11-25T12:01:37 | 2015-11-25T12:01:37 | 43,272,197 | 0 | 0 | null | 2015-09-28T00:51:02 | 2015-09-28T00:51:02 | null | UTF-8 | Python | false | false | 1,092 | py | reify.py | class reify(object):
'''
Put the result of a method which uses this (non-data) descriptor decorator
in the instance dict after the first call, effectively replacing the
decorator with an instance variable.
It acts like @property, except that the function is only ever called once;
after that, th... |
0e98435e9a504943d1f58837d624244a4425e891 | 2ddb9b37fb0dc57ce85e3ca41bebdc5f0bb1d85d | /portfolio.py | 01e36dae00d87a792803f7e4c6c4c87c67cb2525 | [] | no_license | tarrouye/HighPoint | 3bee5cc54feaa575beefb0395974a7d9a0436c6f | 357e2cdf0ff8130601499d2311bbeaa5fb5c6d35 | refs/heads/master | 2020-06-06T20:44:24.489678 | 2019-07-06T21:27:22 | 2019-07-06T21:27:22 | 192,848,383 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | portfolio.py | from company import Company
from utility import companies_from_csv
class Portfolio:
def __init__(self, company_file = "companies.csv", url_fn = "urls.txt", id_ = 'p0001'):
self.url_filename = url_fn # the filename where previously viewed urls are stored
self.company_file = company_file
self... |
5eb7558e0294ace79dd53e50168d4c43ab13288c | 22ff0921aee459abd0a3c15281de80ba6b4035bf | /March/day 10 filefand/taskfilehand/4replace.py | d76d8f75ecfde1fdc37a88b6f7de3bd0a212cd5e | [] | no_license | BhushanTayade88/Core-Python | b0516f234b866682931af95b723adb1269fb946a | f687e4029e3a3aaf751538604dfd06386084252b | refs/heads/master | 2023-08-03T02:09:38.536580 | 2021-10-05T17:25:20 | 2021-10-05T17:25:20 | 413,910,551 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 261 | py | 4replace.py | '''
4.Replace a word by another word in a file.
'''
f=open("testfile.txt","r")
a=f.read()
#print(a)
replace_word=a.replace("word","hello")
f.close()
f=open("testfile.txt","w")
f.write(replace_word)
f.close()
f=open("testfile.txt","r")
print(f.read())
f.close()
|
714f50e725e358d1e299ce5a5a17f899bf1de08e | 919817200361a55f194e32ad1636a5a7054e4c58 | /图形验证码识别/img/case02_方法二.py | 79007aeaea6766fc40d828e09496a105a105535d | [] | no_license | luoshanya/crawl_project | 2d68272d6ef71c9fb033dc267ce6b56dfebfddc4 | 2881093ad37dd005be72f8b2214cadc97255470f | refs/heads/master | 2020-07-05T01:36:28.985965 | 2019-08-23T02:06:03 | 2019-08-23T02:06:03 | 202,484,100 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 182 | py | case02_方法二.py | import tesserocr
for i in range(1,6):
str = 'code{}.jpg'.format(i)
#这次使用的是file_to_text()方法
result = tesserocr.file_to_text(str).strip()
print(result) |
9d3183a2f719ef27b403d86b8e4382a09535cac7 | d0ad071c259151bf8cce28d5a36c65ee53960b8d | /Session10E.py | 87d77a2a4173bfd39895487d849a690f95c903f3 | [] | no_license | ishantk/GW2020P1 | 705f44ddd634a408690db6a3ecfccb0a6801da8e | 682c57e930b38d6f597861e23d0ba5a3b409715a | refs/heads/master | 2022-11-23T18:13:14.453946 | 2020-07-31T03:13:40 | 2020-07-31T03:13:40 | 272,337,327 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 210 | py | Session10E.py | # Dictionary Arguments or Keyword Arguments
# kwargs can be any name of your choice
def register(**kwargs):
print(kwargs, type(kwargs))
register(name="John", email="john@example.com", password="pass123") |
79d23f1e83f807d83744f91cb6a40ba41b16482a | a53c38a11bad8a0557eac2129984730d6b77e998 | /Leetcode/Graphs/CloneGraph.py | 5b6ea769359e603a90e93a5f2bbd8b695de86264 | [] | no_license | saiyesaswym/Algorithms-DataStructures-using-Python | 8acd52524cf17b2ac40f6b1c42259df3273f9402 | ef382256a19154406833c42a467b9bc049a62bd4 | refs/heads/master | 2023-07-09T22:17:10.402750 | 2021-08-12T20:39:20 | 2021-08-12T20:39:20 | 345,517,131 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 727 | py | CloneGraph.py | """
"""
def cloneGraph(self, node: 'Node') -> 'Node':
if not node:
return None
# Dictionary to save the visited node and it's respective clone
# as key and value respectively. This helps to avoid cycles.
visited = {}
q = deque()
q.append(node)
visited[node] = Node(node.val, [])
... |
cf941afcf841cc27ef1f8361f2e4948e6e79f459 | fc02d5f17d7e2f71401d1a94e05441b59236c774 | /master/webstatus/waterfall.py | b4ef5b9e2ff6dee2b93d48114e328bd92332caa1 | [
"BSD-3-Clause"
] | permissive | weaver-viii/skia-buildbot | 0f2420357ee89d892d3a470566d11fb84f861932 | 199badf0f15ecac0b0ad37cd0309c7f0d19650ee | refs/heads/master | 2021-01-22T10:19:02.066727 | 2014-10-09T20:36:58 | 2014-10-09T20:36:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,001 | py | waterfall.py | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Skia's override of buildbot.status.web.waterfall """
from buildbot import interfaces, util
from buildbot.status import builder as builder_status_mo... |
6530f29c828ea23e1e3fa040cc715fa908a006b8 | 8096ceca5c51d4696e5f37d2b71a1dbcc5fc351e | /Homeworks/Day 04/ex_04.py | 2b4b016bbda2f5f048814ada5e109764b2dcb393 | [] | no_license | kajrud/Python-kurs-iSA | 49b306d6d3e7bd7089838b61b7d5451d69bc43ef | e07aa840c193aef472c95bfaa064b7edc08f456f | refs/heads/master | 2021-02-13T19:15:43.911435 | 2020-04-30T08:13:28 | 2020-04-30T08:13:28 | 244,723,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 360 | py | ex_04.py | # Program rysujący piramidę o określonej wysokości
while True:
try:
num = int(input("Podaj wysokość piramidy: "))
for i in range(0, num + 1):
stage = (f"#" * i)
new_stage = stage.center(num)
print(new_stage)
break
except ValueError:
print("Nie... |
b0747b283fc61e7620760968fc19a3f26ec5bb2b | 414ff54888bc709d2cdccd981dd8058882ea3845 | /Segmentation.py | 374c04b075e831f0f48c92117c96e00bc62be9f0 | [] | no_license | Sniccsnacc/Covid_modelling | 5ffa06fa34f6947a60e0d580e0ddfbd333e4c92f | 06f612f4d43809cced7b332648baef5f290b7886 | refs/heads/main | 2023-05-30T09:27:54.160991 | 2021-06-17T08:28:30 | 2021-06-17T08:28:30 | 341,814,747 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,357 | py | Segmentation.py | #%%
import matplotlib.pyplot as plt
from Models import*
from Kom_dat import *
# num_regions = 3
# population = np.array([N, N, N])
# gammas = np.array([1/7, 1/7, 1/7])
# g = np.array([0.1, 0.3, 0.0])
# MT = np.array([[0, 0.8, 0.2],
# [0.3, 0, 0.7],
# [0.5, 0.5, 0]])
num_reg... |
925cc77bd28d17781724d5752069e99d3c66dcfe | ee87c715e5d937b0380ddb87d56e9ebc4877a02b | /examples/ensemble/plot_forest_iris.py | 6aaceea88efd29e1e90227ab7c2a6dde9a35b1b6 | [
"BSD-3-Clause"
] | permissive | scikit-learn/scikit-learn | 27a2196f3173e0f32f7a5c5d652b70a6c57c7644 | 061f8777b48e5491b0c57bb8e0bc7067c103079d | refs/heads/main | 2023-08-18T15:32:59.764468 | 2023-08-18T14:39:08 | 2023-08-18T14:39:08 | 843,222 | 58,456 | 29,777 | BSD-3-Clause | 2023-09-14T19:08:34 | 2010-08-17T09:43:38 | Python | UTF-8 | Python | false | false | 6,285 | py | plot_forest_iris.py | """
====================================================================
Plot the decision surfaces of ensembles of trees on the iris dataset
====================================================================
Plot the decision surfaces of forests of randomized trees trained on pairs of
features of the iris dataset.
... |
ef067783a584ca5326cadbd3addf6fac3459a95c | 56a51a95fc2c37e69a0b22e9c3f4f7339a312a5a | /3-Machine-Learning/2-deep-ml/cnn/test_conv2d.py | fbe835a264f0b1bf85c9d34251a51cc6d27fa948 | [
"Apache-2.0"
] | permissive | dubaokun/code | f533fdb4601b8eb55689737f2face47c52f6f7d2 | e964a8a700505c705ab24e6845363095cb6bca06 | refs/heads/master | 2023-04-29T06:02:48.711534 | 2023-04-12T06:39:10 | 2023-04-12T06:39:10 | 145,675,562 | 7 | 4 | Apache-2.0 | 2022-10-24T20:45:03 | 2018-08-22T07:53:00 | Python | UTF-8 | Python | false | false | 1,320 | py | test_conv2d.py | # coding: utf-8
import tensorflow as tf
# 定义输入图像size
img_size = 256
# 卷积核大小
kernel_size = 7
# 卷积步长
stride_size = 1
# 读入图像文件
image_value = tf.read_file('./661.jpg')
# 图像编码
img = tf.image.decode_jpeg(image_value, channels=3)
# 格式转换
img = tf.to_float(img, name='ToFloat')
# 调整图像大小到定义尺寸
img = tf.image.resize_imag... |
ef6f5d01fff2cfe4c443c4044ed446b73eba1673 | daca35527acc3a35fad2c6c498f7fe7829a55e47 | /Miroir/affichage.py | f77b93567bd73fe40689da4d5c04cfa046b31820 | [
"BSD-3-Clause"
] | permissive | asifadamsha/MiroirConnecte | d78231114b9a01b27bc16d42465e89805d78fc7b | 08f6db3c90e7e97aba627d3be7c526f61197391f | refs/heads/master | 2021-06-21T03:23:59.330118 | 2017-07-19T21:45:31 | 2017-07-19T21:45:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,196 | py | affichage.py | import functools
from pprint import pprint
from tkinter import *
from datetime import datetime, time
from pytz import timezone
# la fenêtre
import apiWeather
fenetre = Tk()
fenetre.configure(bg="#000000", pady=20, padx=20)
fenetre.attributes("-fullscreen", True)
# définitions des variables destinée à la taille des f... |
2116081098067d996bab29d1b843b15929a7bbd3 | 66634946aec18840c00b0e568c41faf3e9f473e7 | /Level2/Lessons12905/yang.py | f024c521a0ab72256349feab67cfaad1998e4cda | [
"MIT"
] | permissive | StudyForCoding/ProgrammersLevel | 0525521b26ad73dcc1fe58a1b2f303b613c3a2f6 | dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25 | refs/heads/main | 2023-08-14T23:15:53.108351 | 2021-10-05T16:04:32 | 2021-10-05T16:04:32 | 354,728,963 | 0 | 1 | MIT | 2021-10-05T16:04:33 | 2021-04-05T05:26:25 | Python | UTF-8 | Python | false | false | 1,650 | py | yang.py | # 가장 큰 정사각형 찾기
def solution(board):
import copy
y = len(board)
x = len(board[0])
arr = copy.deepcopy(board)
for i in range(y):
for j in range(x):
if i == 0 or j == 0:
arr[i][j] = board[i][j]
else:
arr[i][j] = 0
arr[0] = board[0]
... |
d3048ee98d2e1f6715e472bdcca6f90c7d8524d7 | 081402acc4ad2bbf29fc214dbee8cfef61d1ca6b | /atm_program.py | 5fc2d9af4c5b96b6c26516528730237cb6aa1931 | [] | no_license | ahmadnasir500/ATM_python | a1a65a0c2ef7e0cb56277a3222bed7509d93d078 | 5180d6c15473d7aebaf08a318e082914a9fa18cb | refs/heads/master | 2023-06-27T21:28:58.850018 | 2021-07-09T17:57:43 | 2021-07-09T17:57:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,708 | py | atm_program.py | import random
import datetime
from custumer import Customer
while True:
trial = 0
id = int(input("Masukan pin anda: "))
atm = Customer(id)
while(id!=atm.cekPin() and trial < 3):
id = int(input("Pin anda salah. Silahkan masukan lagi: "))
trial+=1
if trial==3:
pri... |
0f73208db03d8613de47e725decbffff508d6175 | 413225198f20ed053cc9508e6284ccb26bcdfbc6 | /train_seq2seq_model.py | 60c70d01591566b3106c33d65c9ec1638e42b250 | [] | no_license | N-Snail/seq2seq | b8e34ff0e55d71b66fb34a5e9fc0e27ab6731984 | e80f07d77c53a46acbda38bc9e8156527877c48c | refs/heads/master | 2020-06-28T23:39:07.387677 | 2019-08-03T12:29:11 | 2019-08-03T12:29:11 | 200,373,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,947 | py | train_seq2seq_model.py | # -*- coding: utf-8 -*-
import tensorflow as tf
from data_helper import load_dict,loadDataset, getBatches, sentence2enco
from seq2seq_model import Seq2SeqModel
from tqdm import tqdm
import math
import os
tf.app.flags.DEFINE_integer('rnn_size', 256, 'Number of hidden units in each layer')
tf.app.flags.DEFINE... |
75533826c0eadee4766270ba131c353263a41365 | 80027352ef3a8f494946d762075901bd654a9dfd | /testapp/views.py | ce0a482d76a21b675a3438f2ebdec0f5ed2a5ef9 | [] | no_license | nithishchandra/django-app | 1d3143fcb988c17a89a836a148dc5cdad7b9a706 | 5c070848bcfa6a30ac709d4cb35e8d1c7001d583 | refs/heads/master | 2020-03-27T19:18:08.512018 | 2018-09-01T07:56:55 | 2018-09-01T07:56:55 | 146,979,552 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 323 | py | views.py | from django.shortcuts import render
# Create your views here.
def helloDjango(request):
return render(request, 'hello.html')
def hellonithish(request):
#print(request.method)
#print(request.GET)
print(request.GET['name'])
print(request.GET['email'])
return render(request, 'hello nithish.html... |
6577cb08d7d29434533789c32061878a708a82ee | 21b201ebf2ffbbc19fa8d74e5657e12ef597b02d | /research/differential_privacy/multiple_teachers/utils.py | 5b9df08ccdd4cb535b3f61fa7ed19d1758eba562 | [] | no_license | alhsnouf/model | fa619691ad9d0afc7ad849a9471e6bb0643a8d47 | 5fe429b115634e642a7469b3f1d4bc0c5cf98782 | refs/heads/master | 2021-04-12T11:16:02.150045 | 2018-03-27T15:19:18 | 2018-03-27T15:19:18 | 126,702,717 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 129 | py | utils.py | version https://git-lfs.github.com/spec/v1
oid sha256:8fc3f7bed9797b949404055ccd31d6d3dd6f97876438fd55bf6910212412b813
size 1323
|
72c9e52e01ea2b71ad3736ae386a31e1da8c9a33 | 5c85a0e74fac111b23e0786619c25dbaa36e76cb | /hash_tables/ransom_note.py | da75760fc7cc12bba53a1b7cf0a483257472aaed | [] | no_license | ylimer/hr_cracking_code | 59d0921ccb3e5609c8edcd6bbbed99cf139c5479 | be2ce9d68a978e92902bae6ca8007659d7744c51 | refs/heads/master | 2022-01-13T00:21:43.467592 | 2019-07-05T20:26:39 | 2019-07-05T20:26:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,610 | py | ransom_note.py | """
A kidnapper wrote a ransom note but is worried it will be traced back to him. He
found a magazine and wants to know if he can cut out whole words from it and use
them to create an untraceable replica of his ransom note. The words in his note
are case-sensitive and he must use whole words available in the magazine... |
044c26d5bac97b30a05a3a4f9a0a2ae76ec03f4a | cb76bba29482cd79990ee9c3b9932e38051e0cc6 | /tools/toolaid/toolaid_builder/node_npm.py | d6ee53cbe3e3c4ccbd33c8201a1c5ded4769de40 | [] | no_license | embray/binary-pkg | 9188f0c8b3d10152b2bbd7255dc75aa5fb2ce2ac | 70bef62139c340f1cbe6149a70e99d5424e1ccb8 | refs/heads/master | 2020-06-16T15:00:16.044355 | 2016-05-22T10:21:37 | 2016-05-22T10:21:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,458 | py | node_npm.py | """
Install stuff using Node + npm
"""
import os
import subprocess
import logging
log = logging.getLogger()
class NodeNpmBuilder(object):
def __init__(self, config):
self._config = config
@property
def config(self):
return self._config
@property
def npm_path(self):
... |
e956f2e0b6d3aebfe333258be38acdf1de43bcaa | 0ce3a0b28ce05442a3406ed9433909813751a3e7 | /code/main.py | 48ca4d7555658db417ff9ee4412f432cbd883236 | [] | no_license | dksainivkd/Automatic-Speech-Sequence-Segmentation | 0f65be60f21aee9d9dce919f245e195033569269 | 56c6131652cad00bf21661884249ab35da96566b | refs/heads/master | 2021-04-09T15:17:37.126788 | 2019-08-21T17:13:44 | 2019-08-21T17:13:44 | 125,754,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,718 | py | main.py | import essentia
from essentia.standard import *
import cv2
import sys
import os
import numpy as np
from pylab import plot, show, figure, imshow
import matplotlib.pyplot as plt
from functions import *
import math
from skimage.transform import radon, iradon
#plt.rcParams['figure.figsize'] = (15, 6) # set plot sizes to s... |
5e55f52fab3c2bb0bdbfe8e67829c51c3a26c1cd | 3e0b3a63b3a23ef07740ded79fd5a6d0e61a6877 | /level_2/module/dynamic_obstacle_santa.py | a08f2f434e43ad3ed2caad88e1e739c617939ad8 | [
"MIT"
] | permissive | yogeshwari-vs/2D-Paramotoring-Pygame | 88c61727ae0c2046cc893556dda5cb5c09ac8ee3 | 82fb2ab81a8d2fb91e3afa27566262c7d80a8cbc | refs/heads/main | 2023-07-17T11:25:23.635005 | 2021-09-02T06:17:48 | 2021-09-02T06:17:48 | 387,520,039 | 0 | 0 | MIT | 2021-07-19T15:58:46 | 2021-07-19T15:58:46 | null | UTF-8 | Python | false | false | 3,119 | py | dynamic_obstacle_santa.py | import os
import pygame
from level_2.module import background_module
from level_2.module import foreground_module
from level_2.module import player_module
class Santa():
"""
Describes bird obstacles.
"""
# Loading bird images
num_of_imgs = 11
path = r'level_2/Utils/Pics/Santa/walking/'
imgs_list = []
for ... |
891846d447654f7b2b0b803b45236c2147d91f60 | 203411f5b39430be79d479eed5aec77b2489c2c1 | /scrapy_tor/test/check_socks_to_tor.py | eab8cb7388f6d5a06caf35a8872cfda63b581aa0 | [] | no_license | wikty/Spiders | 53045384e7d79028ef7f5edfd68070a4bf240a05 | 2d07513c6398450c3f57059a1a8c5a3c3124ad5d | refs/heads/master | 2020-03-28T15:29:22.531313 | 2018-09-13T08:13:33 | 2018-09-13T08:13:33 | 148,599,200 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,709 | py | check_socks_to_tor.py | import socks # SocksiPy module
import socket
import urllib.request
import stem.process
from stem.util import term
TOR_SOCKS_PORT = 9150
def set_socks_proxy():
try:
# Set socks proxy
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, '127.0.0.1', TOR_SOCKS_PORT)
socket.socket = socks.socksocket
# Perform DNS res... |
21a41356fcedb36223498db0fe783e4a9e8e1ba6 | bebb8aac2f751fbf062176666534f9638bbf6008 | /task3.py | fc9e2c5e3c2157aca53d3f96af83dfa5819449f6 | [
"MIT"
] | permissive | KetanGoswami/KetanGoswami | 74c5aab2e32edeae23d7c54964d4ba86b39bc53f | 8d384f09a97fd62f522f414ed67cd3afbb893e4a | refs/heads/master | 2020-05-26T14:02:53.495769 | 2019-05-23T15:01:02 | 2019-05-23T15:01:02 | 188,256,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 855 | py | task3.py | # help from https://stackoverflow.com/questions/19007383/compare-two-different-files-line-by-line-in-python
with open('Book1.txt', 'r') as file1:
with open('20k.txt', 'r') as file2:
same = set(file1).intersection(file2)
same.discard('\n')
with open('notin20kforBook1.txt', 'w') as file_out:
for line i... |
de7b5e44c5c213e4ab70b0f8c0c402edaf4926e0 | 95938d056b71e0cd9d16a085cd4b644ebb3cb56b | /user/urls.py | 867a58c550de1afba265a8184fa632d888a235c0 | [] | no_license | jirongwei/django_mygifts | 1f40d70332ad63c7b5e643d6a6c50b79dbfca556 | ec86d0157a607c709a437cfd85d00e0486b7aca1 | refs/heads/master | 2020-04-02T12:47:04.193516 | 2018-10-24T06:50:17 | 2018-10-24T06:50:17 | 154,451,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 658 | py | urls.py |
from django.conf.urls import url
from .import views
app_name='user'
# user子路由
urlpatterns = [
# user首页
url(r'^$',views.index,name='index'),
# 用户登录
url('login/', views.login, name='login'),
# 用户注册
url('regist/', views.regist, name='regist'),
# 根据id判断用户是否存在
url(r'^getuser\w*/(?P<id>\... |
cc7f1f38efcd4d757c1d11e2bd53695fca44e15a | 47dc7594e987163e100a1900c24e01e69dd4fd82 | /owlready2/owlready2_sample1.py | acdfd9497b2f5d8781154ab2d0a2486abc103f99 | [] | no_license | KeitaK63/RDF_SPARQL_OWL | 21e1e14d9a1dc54e5d3beb2bdc0a6a6f6f244fcd | 7af5587b94e7709a470b4bd683738e995dde6b85 | refs/heads/master | 2022-06-03T16:50:54.457638 | 2020-05-05T03:53:01 | 2020-05-05T03:53:01 | 256,237,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,286 | py | owlready2_sample1.py | 'For learning OWL and owlready2'
'From "https://qiita.com/sci-koke/items/a650c09bf77331f5537f"'
'From "https://owlready2.readthedocs.io/en/latest/class.html"'
'* Owlready2 * Warning: optimized Cython parser module "owlready2_optimized" is not available, defaulting to slower Python implementation'
'↑ This wartning mean... |
a2e2528f560f6117d4ceeb9cd20d3f6f6b2a30a7 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/380/usersdata/308/92723/submittedfiles/minha_bib.py | 9438f17a28ee5126342ea1d5ea08ab6b774aba13 | [] | 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 | 111 | py | minha_bib.py | # -*- coding: utf-8 -*-
def testeum():
a = 10
print(id(a))
def testedois():
a = 10
print(id(a)) |
e09af436f2fb37d16427aa0b1416d6f2d59ad6c4 | 756ea5d7e10967cb6a5c769b7b7f68e0270f67f0 | /scripts/backupManager.py.function | 97811e1ef4b6c2550636b3977e00013da3cc054f | [] | no_license | vncloudsco/ksng-hosting | 33e871fbf67fadfd27a25514cdc4d5d855690328 | 2fdda6f8decba8f06548dc7526c7c52ee2e5f8dd | refs/heads/master | 2023-01-29T09:21:35.259217 | 2020-12-02T08:07:12 | 2020-12-02T08:07:12 | 316,478,452 | 0 | 1 | null | 2020-12-02T08:07:14 | 2020-11-27T11:06:35 | null | UTF-8 | Python | false | false | 5,863 | function | backupManager.py.function | #!/usr/bin/env python3
import argparse
import os
import sys,shutil
from shutil import make_archive
import pathlib
from phpManager import execute,execute_outputfile
from datetime import date,datetime
import re
import pymysql
import tarfile
def append_log(log,message):
f = open(log, "a+")
today = datetime.now()... |
46adb1834f6013ca0f13a64f280182a805d76278 | c4d401bd92d6ea0dff3f0043e437079c0afbe424 | /python/create_kvm | e9663735461ffb7e6629d3a8e942097b02ea694c | [] | no_license | reizer-fs/scripts | ec72bbb4bee004ee6e9e3124830642abae525ecf | 6727c27915620a142ad8bfa8177c793d9665109b | refs/heads/master | 2021-07-14T08:29:53.339906 | 2021-07-02T19:36:57 | 2021-07-02T19:36:57 | 67,484,732 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,111 | create_kvm | #!/usr/bin/python3
# encoding: utf-8
import sys
import argparse
import logging
from pathlib import Path
module = sys.modules['__main__'].__file__
__author__ = 'FFX'
__version__ = '1.0'
log = logging.getLogger(module)
def parse_command_line(argv):
"""Parse command line argument. See -h option
:param argv: ... | |
c63e5a2178e82ec6e0e1e91a81145afb735bf7bf | 42ad7286210f06c0efae79070bf5c463ccd02820 | /ch3/test/searchRangeTest.py | 67d3015fc2f4089e250d12a7a03113139fec73e3 | [] | no_license | ritchie-xl/LintCode-Ladder-Nine-Chapters-Python | 7745ebab29219c7eb919ce26dcd6615e63ff9ddc | bcef70843da5fece2be0cf15ffa6285caff51496 | refs/heads/master | 2021-01-18T00:07:03.462224 | 2015-08-02T20:05:45 | 2015-08-02T20:05:45 | 39,756,100 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 525 | py | searchRangeTest.py | __author__ = 'lei'
import unittest
from ch3.node import TreeNode as t
import ch3.searchRange as sr
class MyTestCase(unittest.TestCase):
def test_1(self):
a = t(2)
b=t(1)
a.left = b
self.assertEqual(sr.searchRange(a,0,4), [1,2])
def test_2(self):
a = t(20)
b = ... |
b77da75b01e96ff89f873f4c5764a62cf68cd576 | 7e05369635bb6595f58c4cc3acd77b22d23e0199 | /coins/serializers.py | cb4548e6292acfd751317e219442fd400be6a9e0 | [] | no_license | Nerevarsoul/coin_catalog | 5b0f96d9d94543a21bcdf8d3277c7c49b19185e7 | 8f14dcde8d9360a7888441fe1db55d8bc36363bc | refs/heads/master | 2022-12-06T18:32:25.461550 | 2021-06-27T09:25:18 | 2021-06-27T09:25:18 | 47,031,388 | 1 | 1 | null | 2022-11-22T07:53:22 | 2015-11-28T16:45:05 | Python | UTF-8 | Python | false | false | 1,464 | py | serializers.py | from rest_framework import serializers
from .models import *
__all__ = (
'CatalogCoinListSerializer', 'CatalogCoinSerializer', 'SeriesListSerializer', 'CoinListSerializer',
'CoinSerializer', 'CountriesListSerializer',
)
class CountriesListSerializer(serializers.ModelSerializer):
class Meta:
mode... |
1f0695f0e9745912d8ee3a87e6c9b1272e9ebbae | ce8c89067cfb58b61943cd6dfcd50e4b73eb1a6e | /record_time.py | 7a9432d10fb31a4e5be9b152026ce1d540c3af7e | [] | no_license | arbuz001/blog-code-snippets | 8bb0122771ccd6a1f119312b77b4a110c8f46a37 | b0b3fc0eb57f8c25daab6a72a318c23e55b090aa | refs/heads/master | 2020-04-25T00:05:11.603124 | 2020-03-11T16:31:55 | 2020-03-11T16:31:55 | 172,366,579 | 0 | 0 | null | 2019-02-24T17:18:47 | 2019-02-24T17:18:47 | null | UTF-8 | Python | false | false | 470 | py | record_time.py | """
Writes day of the week and time to a file.
Script written for crontab tutorial.
Author: Jessica Yung 2016
"""
import time
filename = "record_time.txt"
# Records time in format Sun 10:00:00
current_time = time.strftime('%a %H:%M:%S')
# Append output to file. 'a' is append mode.
with open(filename, 'a') as hand... |
142a2ba3ec2f6b35f4339ed9fffe7357c1a85fa0 | 55791be2a38169c727ba2e434559a1707868bd85 | /dogcrawling_do.py | 67c6da767f4232f91c3ffc5ee629820c67e2af57 | [] | no_license | inaeee/python_dogcrawling | 9135dfed6c575533d71b705a152813373b08c2de | 07563a7ac6da2123439fe8e78cde5c3d546b34cf | refs/heads/master | 2020-11-27T05:22:06.979537 | 2019-12-20T18:56:22 | 2019-12-20T18:56:22 | 229,319,985 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,024 | py | dogcrawling_do.py | import requests
import time
import urllib
import argparse
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from fake_useragent import UserAgent
from multiprocessing import Pool
from lxml.html import fromstring
import os, sys
#text = 'chowchowbaby'
#url='https... |
b8847c84a1c63c8f821bf6690873682a43c2f4b5 | e043ad29195e584ecc67ffb8727d8edc79a53cef | /servo.py | 37419db9a38a8b91c2459af1f4ba765d300e5dc3 | [] | no_license | RO-LIP/Coolometer | 9cf72486d4bd84a3099364f78b540ad315a57ea8 | b7ca6c9f4fd17b94a8755cd4cd861ed02fdfbe94 | refs/heads/master | 2022-12-10T23:13:45.509424 | 2021-05-27T11:55:39 | 2021-05-27T11:55:39 | 245,415,688 | 1 | 0 | null | 2022-11-22T06:08:01 | 2020-03-06T12:36:29 | Python | UTF-8 | Python | false | false | 550 | py | servo.py | import RPi.GPIO as GPIO
class Servo:
def __init__(self,servoPin):
GPIO.setmode(GPIO.BCM)
GPIO.setup(servoPin, GPIO.OUT)
self.servo = GPIO.PWM(servoPin, 50) # GPIO with PWM 50Hz
self.servo.start(2.5) #init
def setservo(self, degree):
if degree < 0:
degree ... |
bec23727ea372dd4101dd882844f0f6767a68071 | e7cdced4bdfb9e39d530481a714170ea35fb3ab4 | /lof/core.py | 0789d9f7394b3af8bd0587bb85fe1a66bd1235d6 | [
"MIT"
] | permissive | bridgecrew-perf7/lof | 7f6b59a70803965311fd9e5c30fa7656fc4b9726 | 9efd3e0d21657de148781dd6adeaabde73506963 | refs/heads/main | 2023-08-18T08:54:24.535080 | 2021-10-08T12:58:24 | 2021-10-08T12:58:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,256 | py | core.py | import os
import sys
from typing import Dict, List, Optional
import uvicorn
from fastapi import FastAPI
from lof.code_gen import create_temp_app_folder, generate_app
from lof.env_vars import path_for_env_file, set_env_variables
from lof.errors import NoTemplate, NoVariablesFile
from lof.generator import create_middle... |
76fe69d7485123362c0950ab38afd1ae3a3729e9 | 4d5f6812f484c98427934fffbee6da76952e0df4 | /ASSINGMENT/MODULE_1/STRING/Assignment Level Intermediate/SI1.py | 81170117e2c1d8f846528ab7507ecba7949ee252 | [] | no_license | meetmaru0810/PYTHONE_ASSIGNMENT | 5d2e96d44a74f1485801a9dc489a8ceaa7b192d9 | d4dff4f3f2c75afd8717d4d7cea24994a69946ad | refs/heads/master | 2022-12-14T03:50:55.837647 | 2020-09-18T16:41:53 | 2020-09-18T16:41:53 | 295,401,409 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | SI1.py | # I1.Write a Python program to get a single string from two given strings,
# separated by a space and swap the first two characters of each string.
s1="qwe"
s2="wer"
print(s1,s2,end=" ")
s11=s2[:2]+s1[2]
s22=s1[:2]+s2[2]
print(s11,s22,end=" ") |
b529c9b7b1db78bd60c44f4519fbb8ad927d3a25 | e0bf8a3b8261c96e706d3ebb3aea024687fd3a09 | /logistic_regression/logisticRegression.py | 5e944dd9ac6b9084166cee17c3b00f6fa16b8bf9 | [] | no_license | IrisYanfGuo/ai-project | be34fd68f0f15c0e28d1a1ebea0db258fcc27475 | 60e6c8a281fa48493bee97eb234e9d5329ed10d8 | refs/heads/master | 2021-01-20T00:37:43.346119 | 2017-05-29T01:18:51 | 2017-05-29T01:18:51 | 89,164,373 | 0 | 0 | null | 2017-04-23T18:49:11 | 2017-04-23T18:49:11 | null | UTF-8 | Python | false | false | 2,057 | py | logisticRegression.py | from toolkit import *
import numpy as np
import pandas as pd
import toolkit as tk
class LogisticRegression(object):
def __init__(self, attributes, trainSet, testSet, alpha=0.2, step=1):
self.__attributes = attributes
self.__trainSet = trainSet
self.__testSet = testSet
self.train(s... |
d821da643ed487001a506a954f5887587261cc0e | 5c937473380275b4e611c2fc964536d71662a0b2 | /tools/generate_sphinx_conf.py | 60b7819913f106d5f4485adb672a519a9c17508b | [] | no_license | allan-simon/tatoebacpp | 04a29d7c3acb32cca51dda74ec29f62e16a33dc3 | 95ee02057dbc6c52558415402afe4dacacc14f43 | refs/heads/master | 2020-06-05T07:10:16.414496 | 2014-01-05T18:40:51 | 2014-01-05T18:40:51 | 6,417,988 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 9,514 | py | generate_sphinx_conf.py | import json
import sys
xmlDumpPath = "/tmp/sphinxdump.xml"
jsonFile = "../config.js"
if (len(sys.argv) == 2):
jsonFile = sys.argv[1]
jsonData = open(jsonFile)
data = json.load(jsonData)
# must contain an ending /
indexPath = "/tmp/"
languageWithStemmer = [
"deu" ,
"spa" ,
"fra" ,
"nld" ,
"... |
a7ab6f2aff4b31e443838ed5aa592ff47464a2b9 | da83c9f4d35cb159f62883e1aeb744cd1bb853df | /Day4/subfolder/TestModule.py | 1654d0139d7a8d2c0e3fbb18224796bac01fdeeb | [] | no_license | skumartd/PythonIntro | 9aed34e3b5c4b1f5d7fc43f816959049841d40ee | 3c08c052b3688e3ed64deb8c04997ecf9667f28b | refs/heads/master | 2020-05-28T01:30:48.915950 | 2019-05-27T12:58:29 | 2019-05-27T12:58:29 | 188,843,320 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 31 | py | TestModule.py | print("Hello from : ",__name__) |
39d47a5f84a0b78f4cdd49bfc532e4fb9e78606b | 11ce993a015026659901c2bedf4dfc09e897af6f | /flask_responses/responses.py | e4a4d89e080950d1c7d65058ba1a1bb8184267a9 | [] | no_license | msabramo/flask-responses | 629a80d843d3b77a382cfe9f0766d4bb96648e32 | 90f9559916e9701a3d0ce5f704c7eebd4f564e4b | refs/heads/master | 2023-09-04T19:57:44.921206 | 2015-01-17T08:09:05 | 2015-01-17T08:09:05 | 29,391,719 | 0 | 0 | null | 2015-01-17T13:19:02 | 2015-01-17T13:19:01 | Python | UTF-8 | Python | false | false | 587 | py | responses.py | # -*- coding:utf-8 -*-
from __future__ import absolute_import
from flask import Response
from flask import jsonify
from .utility import set_headers
def json_response(data, status_code=200, headers=None):
res = jsonify(**data)
res.status_code = status_code
if isinstance(headers, dict):
res = set... |
0450280967bd651587c73e36746305619637ab4a | 8010b12b806a9a98197d7b23c1f8672bac2b235f | /nengo_mpi/partition/metis.py | 9313d97c8e4ad136eaa0465739816c0f8e4ee3b4 | [] | no_license | adityagilra/nengo_mpi | 084c2d074ff56dd3c8accc1c723923718e942ed6 | c0fb9fd17f79f3e27215d73ccfe5a144bd8c74ff | refs/heads/master | 2020-12-25T22:07:56.985853 | 2016-05-12T16:19:28 | 2016-05-12T16:19:28 | 58,651,264 | 0 | 0 | null | 2016-05-12T14:57:53 | 2016-05-12T14:57:53 | null | UTF-8 | Python | false | false | 3,442 | py | metis.py | import subprocess
import tempfile
import os
_metis_available = True
try:
devnull = open(os.devnull, 'w')
subprocess.call(["gpmetis"], stdout=devnull, stderr=subprocess.STDOUT)
except OSError as e:
if e.errno == os.errno.ENOENT:
_metis_available = False
else:
raise
def metis_available... |
71c946557c3ab065a224d63dfa7863a609b2e6f4 | 2b25aae9266437b657e748f3d6fea4db9e9d7f15 | /graphics/line/8/eric_wong/main.py | f0548dc3039430f280c2f515fea4b35f60339b86 | [] | no_license | Zilby/Stuy-Stuff | b1c3bc23abf40092a8a7a80e406e7c412bd22ae0 | 5c5e375304952f62667d3b34b36f0056c1a8e753 | refs/heads/master | 2020-05-18T03:03:48.210196 | 2018-11-15T04:50:03 | 2018-11-15T04:50:03 | 24,191,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,074 | py | main.py | from display import *
from draw import *
import random
screen = new_screen()
color = [ random.randint(0,255), random.randint(0,255), random.randint(0,255),]
for a in range(10):
matrix = []
for x in range(50):
add_edge(matrix, x*a*10, 0, 0, XRES, x*a*10, 0)
draw_lines( matrix, screen, color )
... |
0cc91403c8e1660bd09dfcfd0aed4a1f10e117c2 | 6900f20d8d96b73938761871dc23f10681995bc3 | /Code/MEG/RunScripts/run_CHANNEL_71.py | faa6862ad09676ab3f8b59ef627f69d8921df663 | [] | no_license | FAIRNS/sentence-processing-MEG-LSTM | f2b0b37b3f8447c2aea1600ae8ab83acd207355e | 5ef1fbb5d6f4922cb19602e9c89163ec04f6ed48 | refs/heads/master | 2021-05-11T01:50:51.398651 | 2021-02-04T15:07:50 | 2021-02-04T15:07:50 | 118,335,132 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 60 | py | run_CHANNEL_71.py | import os
os.system('python2.7 main_alignment_model.py 71')
|
a93ebf43d4c0eaa2d91227fd18b5d2f7080232cd | c10f20abec372f81dbd6468ead208543f60940f1 | /tensorflow_model/dmp-data/src/inter/srv/u2t/trans_ual.py | 0dc9a9fff6bcf3e7c80ad9073f6d636f70d1c21c | [] | no_license | alenzhd/meachineLearning | 64876e7a6c0b8b39a63a9eb586d306a3489b4447 | 1b66ce2f73b226548f07e45c8537b8286635a048 | refs/heads/master | 2021-08-24T10:55:52.056439 | 2017-12-09T10:26:37 | 2017-12-09T10:26:37 | 112,688,163 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,395 | py | trans_ual.py | #!/usr/bin/python
# coding: utf-8
import sys
import os
import urllib2
def http_get(key, value):
#online
url = 'http://10.1.3.127:18090/behavior/save?key=' +key + '&value=' + value + '&version=1.2'
#test
#url = 'http://10.1.3.91:18090/behavior/save?key=' +key + '&value=' + value + '&version=1.2'
re... |
070e3c64c579e1d6ccbc40df3b62496aad63ea7d | 248b48bdaf66e53dff21d0ab992526d1d8fd4672 | /filesizechecker.py | 4ba78f7165fb4c7476ad63d5fea80849c3d6a214 | [] | no_license | chrisolat/pythonprograms | 4e78eaff6dd58192bce959ee714f08efc4ca81c1 | 936dbe91de77b62bd7b2049c9add36abdbba2686 | refs/heads/master | 2023-06-01T16:28:57.175384 | 2021-06-17T07:02:44 | 2021-06-17T07:02:44 | 310,916,420 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 835 | py | filesizechecker.py | import os
def convert_bytes(num):
for x in ['bytes', 'KB', 'MB', 'GB', 'TB']:
if num < 1024.0:
return (num, x)
num /= 1024.0
def file_size(file_path):
if os.path.isfile(file_path):
file_info = os.stat(file_path)
return convert_bytes(file_info.st_size)
def remove(file_path):
print(file_path) ... |
0c3915ec591f982cf2fdecc60083d0c922e903e9 | 3469703501c75c7190c4d8c1f7529561df2448ba | /binance/model/tickerpricechangestatistics.py | 532a896ec847a39674914b4b8518908547e0ae34 | [] | no_license | AbigalChulchill/binance-api-python | b5c745e98b5b4ab9873a7b4aaa8708bf9cf24496 | 544bbc152dd7accd0ac4f13faa7d254382c79e77 | refs/heads/master | 2022-04-20T18:03:31.889472 | 2019-12-20T14:21:12 | 2019-12-20T14:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,143 | py | tickerpricechangestatistics.py | class TickerPriceChangeStatistics:
def __init__(self):
self.symbol = ""
self.priceChange = 0.0
self.priceChangePercent = 0.0
self.weightedAvgPrice = 0.0
self.prevClosePrice = 0.0
self.lastPrice = 0.0
self.lastQty = 0.0
self.bidPrice = 0.0
self... |
4c944980979ba74f2a47e4be2eb8f6001ba192b8 | 5c3d99e7abe8b846d8c01b42af6127d68bfca71e | /cnn.py | b9600b8a1d002abdfa76bc85a776439bd57f57ac | [] | no_license | suta0001/tbi-mice-detection | 0ce6ac1e12ecafee931746fdf8b4f357e0e5da23 | a5d5a31f5ddd46cbca5a2f5ec3b13d020e4e82e5 | refs/heads/master | 2022-07-04T03:27:38.490365 | 2020-10-11T21:27:55 | 2020-10-11T21:27:55 | 180,941,851 | 1 | 0 | null | 2022-06-16T23:30:19 | 2019-04-12T06:10:40 | Python | UTF-8 | Python | false | false | 4,484 | py | cnn.py | import csv
import math
import numpy as np
import os
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.preprocessing import StandardScaler
import sourcedata as sd
import statistics
import sys
import tensorflow as tf
# parameters to be varied
eeg_epoch_width_in_... |
cfc253a6975b2e29be88c284fb3435996bd9d4f9 | 06d1b09b96d3d43fa9444732a7d6c760b0452030 | /comments/models.py | 7ca5a18e3318d49cfc43904ea54674e0099193c1 | [] | no_license | Cisco-Nokia/firstblog_pro | a3c6c0ceb6c58453cee6edf1bb329ba9b8395655 | 799679fcb008263045ec9214109a257aedf9fac5 | refs/heads/master | 2021-01-23T14:44:19.153388 | 2017-09-07T06:05:00 | 2017-09-07T06:05:00 | 102,696,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 668 | py | models.py | from django.db import models
# Create your models here.
# 定义评论模型,每条评论都属于一个用户,每条评论都只属于一篇文章
class Comment(models.Model):
username = models.ForeignKey('users.User', verbose_name='评论人')
content = models.TextField(verbose_name='评论内容')
date_publish = models.DateTimeField(auto_now_add=True, verbose_name='评论时间')
... |
4e644e90fc953c0a8de3321c5bcaa3616e8ec2a4 | 4526373a19fc985b977e3130b5add9a336f291c6 | /AdventDay8.py | 8d0e6de9a529eebf012ee92413f492e743df43cc | [] | no_license | Hardthof/AdventOfCode2020 | 104545a70605223f4f407a9560b748c688bebcc8 | a7c2a0c554646208065f2ae3af4a5e229c5f3422 | refs/heads/main | 2023-02-18T23:42:29.172438 | 2021-01-23T15:07:49 | 2021-01-23T15:07:49 | 321,069,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,427 | py | AdventDay8.py | from datetime import datetime
def bt(data):
#print('depth: ', len(data['hist']), '\n', data)
if data['stp'] in data['hist']:
#print('last vlaue is: ', data['accumulator'])
return False
nd = data.copy()
nd['hist'] = data['hist'].copy()
nd['hist'].append(nd['stp'])
if data['cmd'... |
3630eeced64a56a11213fd6031a9541607342d1c | 6b124860cd23434862f9c77022d4887bd5dd7989 | /src/wiki_checklist_crawler.py | 56e812f1227da25ca7086590d6f33d38d313fa03 | [] | no_license | comakingspace/Machine-Checklists | 7ae809db3b5fb9935e3776a5c2dab20c522b7113 | 7c5c529b4c2374bd528a93c45d9d18842bffe5e9 | refs/heads/main | 2023-07-16T15:40:32.495509 | 2021-08-28T11:47:03 | 2021-08-28T11:47:03 | 382,920,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,189 | py | wiki_checklist_crawler.py | from urllib.request import urlopen
from urllib.parse import urlencode
import json
import argparse
import pathlib
import pprint
def askWikiAPI(url, query):
payload = {'action': 'ask',
'format': 'json',
'errorlang': 'uselang',
'query': query}
payload_string = urle... |
72b29ea7f54f2004cdec76b013a34d103a5ecd90 | 8a01ecedbb6c35c01b2da7ca08a995329ce2b8da | /application/__init__.py | 0e55e2fe7716f0b0e5e5022692199b87e763cc46 | [] | no_license | jokineno/Tour | 5f0bdfe99dedc9fd44f304f789fdd2d7dd717126 | 44434f9716b5e6c1bbb75835a38a2fb9dd1ea476 | refs/heads/master | 2023-02-09T04:47:47.166618 | 2020-04-22T12:51:05 | 2020-04-22T12:51:05 | 176,293,081 | 0 | 0 | null | 2023-02-02T04:52:17 | 2019-03-18T13:33:24 | Python | UTF-8 | Python | false | false | 3,139 | py | __init__.py | from flask import Flask
app = Flask(__name__)
from flask_sqlalchemy import SQLAlchemy
import os
if os.environ.get("HEROKU"):
app.config["SQLALCHEMY_DATABASE_URI"] = os.environ.get("DATABASE_URL")
else:
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///gigs.db"
app.config["SQLALCHEMY_ECHO"] = True
... |
9f0fa789dd653a990ec4f506eaadf8e8691a6018 | b3c72d1038f271c823d82d7867ab1afed561ac92 | /cosmos_graph.py | c5d1161ff5bb805af31add1dd96faa84d9f24bd0 | [
"Apache-2.0"
] | permissive | LuisBosquez/azure-cosmosdb-graph | c571ea838af7aea82df665415c2e04ad535aa053 | 72873af9d4eed9f469ebb8016844da8c7afc8aa7 | refs/heads/master | 2020-03-19T23:19:24.824745 | 2018-04-23T20:26:56 | 2018-04-23T20:26:56 | 137,002,205 | 1 | 0 | Apache-2.0 | 2018-06-12T01:47:15 | 2018-06-12T01:47:15 | null | UTF-8 | Python | false | false | 12,868 | py | cosmos_graph.py | """
Usage:
python cosmos_graph.py drop_graph dev movies
python cosmos_graph.py create_load_queries dev movies
python cosmos_graph.py execute_load_queries dev movies
python cosmos_graph.py query dev movies countv
python cosmos_graph.py query dev movies movie tt0087277
python cosmos_graph.py query dev movi... |
b54bcf4ca64e168f1bd977100b76ba0724f32444 | 9e43bbe672ac9e49165d847e590a0cd6c0f2a194 | /Baxter1.py | eb89d7ece69b25672c01dae92751d7ded6edc5fa | [] | no_license | Jwkellenberger/Baxter-Step-by-Step | 70ae1472c9b43edab84f15856ae1ab0daf45c1ea | 8cf07ea3edfa78c10bce03a5f6d6c55f62edb2fe | refs/heads/master | 2021-04-27T00:26:54.226841 | 2018-03-15T11:39:54 | 2018-03-15T11:39:54 | 123,816,358 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,529 | py | Baxter1.py | #!/usr/bin/env python
# # Project 1: Moving a Single Arm
#
# #### Baxter's Arm Joint Labels
#
# ## Our Goal for Project 1
# To construct a python program to control a single arm!
#
# #### Things to consider:
# - ROS is VERY picky about running python (We need Python 2.7).
# - Import the proper files for ROS interac... |
203ca913dd73568cd10ee62f6aea2265abb5b2a3 | 803ad2c288fb56fef647e0a216d239c495d27877 | /player.py | e6056d5de1c878a0ad1c17cd8e3921001ed04c9a | [
"MIT"
] | permissive | jay-krishna/IPL-Analysis | 662b1edab20c88af47db8adb686fd81a585ce747 | 91251d499f99ce1155ac41f7067f2b80144142b1 | refs/heads/master | 2020-12-09T15:51:52.203570 | 2020-01-17T17:28:47 | 2020-01-17T17:28:47 | 233,347,702 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,473 | py | player.py | import os
import pandas as pd
def get_unique_players():
directory_path=os.path.join(os.getcwd(),'ipl_scorecard')
des=os.path.join(os.getcwd(),"data")
df_bowling=pd.DataFrame(columns=["Name","Balls","Runs","Dot","Other","4","6","Wicket"])
df_bowling=df_bowling.set_index(["Name"])
df_batting=pd.Data... |
a9f73c033cc975c7d078adba3da4180ee6ed1256 | 6f2955ae0424cd2265033582a51024b7fd30ccbc | /exercises/exe_13_2.py | 2f1c6bf8548f033def91cad314fc425e21f669c3 | [] | no_license | cabarca01/PythonDojo | 7436198867b066b1f6277085e0b3a91af67a5019 | 74f9bc65fcd3fdd9c84edd693230082c202c198a | refs/heads/master | 2021-08-18T09:55:01.172324 | 2021-01-26T21:14:44 | 2021-01-26T21:14:44 | 42,245,275 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 261 | py | exe_13_2.py | import pymongo
conn = pymongo.MongoClient("localhost")
db = conn.school
query = {
"name": {"$regex": "^M"}
}
projection = {
"name": 1,
"_id": 0
}
cursor = db.students.find(query, projection)
for student in cursor:
print student.get('name')
|
f168a10eacd8e978db731e31380c9d7f51b394fd | 524dad76f1d2935539779983db1c7edecd47c627 | /app/common/pagination.py | f0346f10cea6d0d11f3da51b530f4c9c220cd9bd | [
"MIT"
] | permissive | vanwt/cmdb | 13a37939d81ab7a36c42172b05da79c0dfc7dbf3 | c1539140ab0a20d8e2be98e5d878b46848122316 | refs/heads/master | 2023-01-13T21:14:50.909835 | 2019-12-15T05:19:35 | 2019-12-15T05:19:35 | 228,131,671 | 1 | 0 | MIT | 2023-01-05T03:05:40 | 2019-12-15T05:07:36 | JavaScript | UTF-8 | Python | false | false | 1,342 | py | pagination.py | from rest_framework.pagination import PageNumberPagination
from collections import OrderedDict
from rest_framework.response import Response
class VuePageLimitPagination(PageNumberPagination):
page_size_query_param = "limit"
page_query_param = "page"
max_page_size = 200
def paginate_queryset(self, que... |
926e91a45dde8d406e40ccaba72c08207861ad81 | 127df7826d094368ee6f12bef3b7f3c6546de0b5 | /img_filter.py | 466e335ad0f3f94e3a7e15b7d4673b2eb6c01f4d | [] | no_license | aakp10/neural-network | 19d14bc6bc3df8e2f30e561634489ab71b72d905 | 7bca1c2d47874545ddd756f1ad7b27a30f183f68 | refs/heads/master | 2021-01-13T07:06:36.949705 | 2018-06-24T20:17:35 | 2018-06-24T20:17:35 | 81,819,908 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 810 | py | img_filter.py | import scipy
import numpy
from scipy.misc import imread ,imshow
from scipy import signal
img=scipy.misc.imread("/home/aakp/Pictures/krishna.jpg", flatten=1)
#resized img
reimg=scipy.misc.imresize(img,(682,682), interp='bilinear', mode=None)
#filter
filter=numpy.array([[2,4,5,4,2],
[4,9,12,9,4],
[5,12,15,12,5]... |
768e2a057230c871654ab43b22da4e5eddfb418c | ef3f7409954de0493c56353f9d21ba52b068b738 | /env/lib/python3.6/site-packages/incremental/__init__.py | 88bf0d84666e44d70f9ef09ab0a124a1d2bbc0c4 | [
"MIT"
] | permissive | aldo0705/my-first-channels | 2ea0e9175885e7273fea0dbc5e1b167554a3f12e | 3841d45b5fbe5e44f1fdca1097757445d8ac54d7 | refs/heads/master | 2022-05-05T10:16:02.016001 | 2020-02-23T19:52:49 | 2020-02-23T19:52:49 | 242,341,374 | 0 | 0 | MIT | 2021-06-10T22:35:58 | 2020-02-22T12:54:02 | Python | UTF-8 | Python | false | false | 15,629 | py | __init__.py | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Versions for Python packages.
See L{Version}.
"""
from __future__ import division, absolute_import
import os
import sys
import warnings
#
# Compat functions
#
if sys.version_info < (3, 0):
_PY3 = False
else:
_PY3 = True
unicod... |
e17119058478e80e1aeb7cff4321ac3623daba09 | 07726162295027e13cd8138dccf0dea166863135 | /custom/urls.py | ff92063ddc34f32bc5ef830bcd243f270a75142b | [] | no_license | cesaring541/SchoolApp | ba77c699f187772cb6b98f8990f8afbcf2335a7c | ee85129a9b115f95a1004cfe2bfe26e96c8b3421 | refs/heads/master | 2021-01-01T16:34:21.128144 | 2014-10-30T04:08:18 | 2014-10-30T04:08:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,014 | py | urls.py | from django.conf.urls import patterns, url, include
urlpatterns = patterns('',
url(r'^/$','custom.views.herramientas', name='herramientas'),
url(r'^/crudHerr$','custom.views.crudHerramientas', name='crudHerramientas'),
url(r'^/selCursoWiki$','custom.views.selCursoWiki', name='selCursoWiki'),
url(r'^/selMatWiki$','... |
0de18dc971ebb3d7602d42365e78c0777f534c9f | 3d9de48ac0d4f307d5fe2e892a59acfdfce3a479 | /hackerrank/python/swap_case.py | 25a0bd92dc8a3cb4562645546f56057473fde855 | [] | no_license | sgouda0412/Coding-Questions | a6f34f445ec50f109c9b1cb7809a0ad22a864545 | 0a39b565d5f16261ad73b3e09faccb5cfc9311d8 | refs/heads/master | 2023-05-02T08:14:28.331240 | 2021-05-22T19:03:44 | 2021-05-22T19:03:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 100 | py | swap_case.py | def swap_case(s):
return "".join([i.upper() if i.isupper() == False else i.lower() for i in s])
|
ae249ade41a7ccfcf600e40025653f58b5581b3d | 30eef3acb040051849314bb4ef72e4be1fa4308b | /spot/migrations/0001_initial.py | 335cb928651e220eaa6b20a0173e5a0696f69823 | [] | no_license | Benbb96/MySpot | feca9e87e7696791a7e7d898c827bff2b52889ac | e6253b569339fa20190db626e141e4832e72f2c7 | refs/heads/master | 2021-05-01T08:45:35.103686 | 2018-02-11T22:58:16 | 2018-02-11T22:58:16 | 121,174,062 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,657 | py | 0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-11-13 12:41
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... |
8945b0226e2aef4327a43b1d101ba71e45ce7c5e | fa7e3d53b1950c91062fca54f8b906d798b5e4a1 | /artfaircalendar/tests/test_calendar.py | 2784e68feb8da0dae783697bf33884146b8a7b63 | [] | no_license | danielhenrymantilla/artfaircalendar | 7f98aa6d49505c3c1c8886919734f01432d9c91f | 08361ff98bbe5e88cc253a9e31a4655b86dd777e | refs/heads/master | 2020-07-22T08:22:00.660749 | 2019-09-08T11:43:33 | 2019-09-08T11:43:33 | 207,129,709 | 0 | 0 | null | 2019-09-08T15:07:32 | 2019-09-08T15:06:05 | null | UTF-8 | Python | false | false | 1,044 | py | test_calendar.py | import datetime
import os
import unittest
from dateutil.relativedelta import relativedelta
from artfaircalendar.calendar import Calendar
class TestCalendar(unittest.TestCase):
def setUp(self) -> None:
self.calendar = Calendar.from_end_date(datetime.datetime.now() + relativedelta(months=+12))
def t... |
d6ddd0248d0512781a1baf061e742a5ff627e5c1 | 5e4dffb7349486578333bb2b6d4dffc348052f2e | /TileTraveller4.py | 57ddbd802b9e1af84061ba495c7278f5f5f325b7 | [] | no_license | xioner/TileTraveller | 9c7e547990dcf0c8fcdff09a8a64f2a45be3ccaa | baba6c078f6ec097c7a1785e85dcdb3ae8b9cc26 | refs/heads/master | 2020-03-28T22:50:33.316234 | 2018-10-04T19:31:12 | 2018-10-04T19:31:12 | 149,256,509 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,453 | py | TileTraveller4.py | # Constants
N = '(N)orth'
S = '(S)outh'
E = '(E)ast'
W = '(W)est'
def moving(col: int, row: int, direction: str)->int:
''' Take in current position and return a new position'''
if direction.lower() == 'n':
row += 1
elif direction.lower() == 's':
row -= 1
elif direction.lower() == 'e':... |