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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
153a33b85cf8b3ef9c742f05b460e94e0c684682 | d7460087a6e2600a1c05b6f66b6dd36690b7f81a | /OOP/P07_MoreOnInheritance.py | 5b72455d7a6f071555f29eaa05a9006393ee8870 | [
"MIT"
] | permissive | akhileshsantoshwar/Python-Program | 784cec3cbc0bd1792327577c6437f8206a4f9917 | 0c8305cb2838edabd3e76593232ceb15ef6f610d | refs/heads/master | 2022-04-10T04:56:27.888826 | 2020-01-31T17:22:02 | 2020-01-31T17:22:02 | 227,990,745 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 691 | py | P07_MoreOnInheritance.py | #Author: AKHILESH
#This program illustrates the advanced concepts of inheritance
#Python looks up for method in following order: Instance attributes, class attributes and the
#from the base class
#mro: Method Resolution order
class Data(object):
def __init__(self, data):
self.data = data
def getData(s... |
e207063eb3eb1929e0e24b62e6b77a8924a80489 | 74defe917c38b637675508231c4f7b1164b6399a | /texte COHPIAH.py | 44b42574d84a0e5810e606a13cbc2e28f02118c8 | [] | no_license | Beatrizpjunq/Learning_python | 5b9b2a00193197bac22376b04f9bba7ccd36b2d1 | 9d018923b230941d00c44d121cb4fb4e2ac62b71 | refs/heads/master | 2023-03-12T17:38:58.832213 | 2021-02-26T01:10:12 | 2021-02-26T01:10:12 | 281,508,099 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,211 | py | texte COHPIAH.py | # -*- coding: utf-8 -*-
"""
Created on Sat Jul 18 20:24:53 2020
@author: filip
"""
import re
texto = "Muito além, nos confins inexplorados da região mais brega da Borda Ocidental desta Galáxia, há um pequeno sol amarelo e esquecido. Girando em torno deste sol, a uma distancia de cerca de 148 milhões de quil... |
5d7080f2778133d1938853512ca038edcf7c0dc4 | 41251374278cd9ec764f76c98d257cdb7130865a | /src/bda/plone/ticketshop/tests/__init__.py | ac63718f7f0732008fcfaae198dcdade644e7a49 | [] | no_license | bluedynamics/bda.plone.ticketshop | 026fc6f215dd8c69b366d5716e7e7561f2dd2b6b | fe0bbc3e4e7dd5d8bb4ea96e754ad5e1bfec77e4 | refs/heads/master | 2020-12-24T06:38:07.180729 | 2017-06-20T07:28:51 | 2017-06-20T07:28:51 | 10,504,800 | 1 | 1 | null | 2017-06-20T07:28:52 | 2013-06-05T14:41:08 | Python | UTF-8 | Python | false | false | 4,113 | py | __init__.py | from Products.CMFPlone.utils import getFSVersionTuple
from bda.plone.ticketshop.interfaces import ITicketShopExtensionLayer
from plone.app.robotframework.testing import MOCK_MAILHOST_FIXTURE
from plone.app.testing import FunctionalTesting
from plone.app.testing import IntegrationTesting
from plone.app.testing import PL... |
646f6a0afc3dc129250c26270dda4355b8cea080 | ab670d6e59ebd4a0c23fa867fb77866d223163da | /Python/Problem127.py | 8f97106654053ee75523605395638299903df7f9 | [] | no_license | JeromeLefebvre/ProjectEuler | 18799e85947e378e18839704c349ba770af4a128 | 3f16e5f231e341a471ffde8b0529407090920b56 | refs/heads/master | 2020-07-05T02:42:44.844607 | 2014-07-26T01:04:38 | 2014-07-26T01:04:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,411 | py | Problem127.py | #!/usr/local/bin/python3.3
'''
http://projecteuler.net/problem=127()
abc-hits
Problem 127
The radical of n, rad(n), is the product of distinct prime factors of n. For example, 504 = 23 × 32 × 7, so rad(504) = 2 × 3 × 7 = 42.
We shall define the triplet of positive integers (a, b, c) to be an abc-hit if:
GCD(a, b) = ... |
3079fdbe6319454ad166d06bda5670554a5746ee | 0e56bfa9b9f345aad98ae08e45dfeb800258d9de | /estruturas_basicas/string_op.py | 48cae4755fe4e131aa25af3fcf27c1c453c4e39d | [] | no_license | karenngomes/learning_python | 02a8e1864b243fb382b4c1e979a43d82af69c472 | f45747217928955212bd03b4184efd1e646d236e | refs/heads/master | 2021-07-07T04:49:44.988553 | 2019-01-25T06:21:55 | 2019-01-25T06:21:55 | 119,829,113 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 359 | py | string_op.py | # len(): tamanho da string
# count(): conta quantas vezes um caractere aparece
# lower(), upper()
# replace(): substitui as letras por outra
# split(): quebra uma string a partir dos espacos em branco
a = len('Karen')
print(a)
b = 'Rainha Elizabeth'.count('a')
print(b)
c = 'karen nayara'.replace('a','@')
print(c)
d = ... |
2cdcd6976a1ec99b927adcedc48c36bbda1b4e18 | 92408fb522299d1473ea2541131891a99d78705e | /gen.py | d467b8dba74914c4dbc38d28210a6d132c7a4831 | [] | no_license | RoPe93/padder | 6c3709026330759a4098853f7d1ce8d734a07cf3 | 8536aba78fd1f00079e5d5dc144d05af7c0d363f | refs/heads/master | 2021-01-24T03:37:42.687303 | 2015-02-01T15:57:48 | 2015-02-01T15:57:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | gen.py | """ Generate test pads for padder. """
# usage: python gen.py > pads.txt
import random
pad = ""
count = 0
# The pad chars MUST match the character set used by padder.
# See the 'characters' variable in 'main.hpp' for more
# information.
chars = "abcdefghijklmnopqrstuvwxyz0123456789-"
print "#", "Pad"
while count... |
d68bd9c90a106a9eac767607ad77bdd84d0f18d2 | 3a8caed594769c253bbf47808ea4bc7b7d083346 | /app.py | 7cd82863e4919a622f3d521ffb72c72600e5778d | [] | no_license | LHYAha/flask_demo | b3843f20e65a8095ca8c99194dead2ed28b53993 | 04be0dc9aa37d5c91890a3b47555473703ccfb1d | refs/heads/master | 2022-11-20T17:01:05.807773 | 2020-06-28T11:56:22 | 2020-06-28T11:56:22 | 275,575,026 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,500 | py | app.py | #-*- coding = utf-8-*-
#@Time : 2020/6/26 11:02
#@Author :Ella
#@File :app.py
#@Software : PyCharm
import time
import datetime
from flask import Flask,render_template,request #render_template渲染模板
app = Flask(__name__) #初始化的对象
#路由解析,通过用户访问的路径,匹配想要的函数
@app.route('/')
def hello_world():
return '你好'
#通过访问路径,获取用户的... |
6da828a797efac7c37723db96a2682e960c317b5 | d0ab27dd1a84ff3800c8505784591fe38360a188 | /setup.py | cd957a05f65fd133d73d14d6c94094790f10e079 | [
"MIT"
] | permissive | timothydmorton/keputils | 52c92497001e4f03026ff5c2a79c003d0d78e45d | 82e86fbc997b18b99846bf829abaca9329924aa5 | refs/heads/master | 2020-04-06T07:02:35.234008 | 2016-12-01T16:29:34 | 2016-12-01T16:29:34 | 19,376,397 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 907 | py | setup.py | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name = "keputils",
version = "0.2.1",
description = "Basic module for interaction with KOI and Kepler-stellar tables.",
long_description = readme(),
author = "Timothy D. Morton",
author_email... |
9c6bb885c05ee13a283b09861a5aa7c5e62677cb | d8bd18064a41943d1c00890a7bb0b39f5ddfb195 | /number is positive or negative | 86e1c0f354f7d2e5ace618df0b92b91855a96d66 | [] | no_license | sandeepb7/Basic_Learnings | aec00fbb6e091e479b9cfec7e7ae8e3545abfe04 | a439252e1b68e9376305d37a2307193237a6bc3d | refs/heads/master | 2020-03-30T22:40:31.377801 | 2018-10-05T05:48:30 | 2018-10-05T05:48:30 | 151,674,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | number is positive or negative | #!/usr/bin/python
def check(n):
if n == 0 :
print "neither Positive nor Negative"
if n < 0 :
print "Negative"
if n > 0 :
print "Positive"
print "10 is ", check(10)
print "-5 is ", check(-5)
print "0 is ", check(0) | |
93e8e9fc4f0503dfc3243bef5ab8261a4cdfc296 | 77833ccef3b56675d2a017dc5ebc34ab49e8e5d8 | /bin/version | 45f9daca08cb3c3f202d3aefcfd5dce2d27232bc | [
"Apache-2.0"
] | permissive | c4s4/babel | af82fac74806378c67ea048569f4e496e0025acb | f6b0fa79a5b67bbd26022345d709c5887c482db3 | refs/heads/master | 2023-04-09T18:30:33.102563 | 2023-03-25T12:13:17 | 2023-03-25T12:13:17 | 26,016,920 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,491 | version | #!/usr/bin/env python
# encoding: UTF-8
'''
Script to select current version for a given soft (python, ruby or java).
'''
import os
import re
import sys
import glob
import getopt
# fix input in Python 2 and 3
try:
input = raw_input # pylint: disable=redefined-builtin,invalid-name
except NameError:
pass
cl... | |
d3241dc05a690d086a022b0ab45addd8fbe0e2a3 | 3dab8e48a59bdccc4e8b48d4027f177efbb465b4 | /coarse/find-hash.py | 07f2aae1c92fd41a1807a3d1c7e0902c77095686 | [] | no_license | clenimar/sd-k8s-jobs | fbbbc3f10dc602268a59756e86516ba63c5a768d | 9222a2666acd1b793ccf00902670b60c4319dfc1 | refs/heads/master | 2021-01-25T04:36:25.987909 | 2017-12-19T20:40:02 | 2017-12-19T20:40:02 | 93,459,188 | 0 | 1 | null | 2017-12-19T20:40:03 | 2017-06-06T00:33:23 | Python | UTF-8 | Python | false | false | 1,208 | py | find-hash.py | #!/usr/bin/env python
from hashlib import sha256
from random import choice, randint
from string import ascii_letters
from string import digits
import sys
LETTERS = ascii_letters + digits
MAX_TRIES = 10000000
def check_string(string, prefix):
"""Checks if the given string's hash starts with the given prefix."""
... |
b7e13f04c5ff78e92b077ceff9b74cc5a25e8b05 | 1d9f0122ce0c1dfaec7a5b733a35861cdfa42c87 | /demo_tableau_suffixes.py | 062d343cc7177d77a7173a3663ab9a75882f0c73 | [] | no_license | DraceniY/BIN1002 | c82c2ed074de8bfa81ebb8e291d43bfc713aeb00 | 3bd85dddc207b2a89735568445c03cddd7587fa4 | refs/heads/master | 2020-04-19T21:43:09.499942 | 2019-12-03T14:21:15 | 2019-12-03T14:21:15 | 168,449,839 | 0 | 0 | null | 2019-01-31T02:47:41 | 2019-01-31T02:32:15 | null | UTF-8 | Python | false | false | 579 | py | demo_tableau_suffixes.py |
def open_fasta (filename):
f= open (filename , "r")
sequence = []
for line in f :
if line[0] != ">":
sequence.append(line.strip())
return "".join(sequence)
f.close()
def tableau_suffixes(tab):
tab_s = []
n = len(tab)
for i in range(n):
tab_s.append([tab[i:]... |
9187c066faba69914469a2076837f4ef25937d01 | bafe6480c4071d89e6490a1c0adca31d82d6e34f | /students/Scott_Hancock/session03/slicing/slicing.py | 71238deec3ce3c4a7e09b619f0da02bb22a53816 | [] | no_license | UWPCE-PythonCert-ClassRepos/Wi2018-Classroom | c05763940ca22f21dd3e96f795a210e0f5658fdb | f0a6d8df31d28f0fecf32add03a05285e58aac22 | refs/heads/master | 2018-09-18T17:27:06.925189 | 2018-06-06T04:36:30 | 2018-06-06T04:36:30 | 115,212,326 | 3 | 40 | null | 2023-03-17T04:15:30 | 2017-12-23T17:51:25 | Python | UTF-8 | Python | false | false | 1,555 | py | slicing.py | def exchange_first_last(seq):
""" Return given sequence with exchange of first and last elements """
return seq[-1:] + seq[1:len(seq)-1] + seq[:1]
def remove_every_other(seq):
""" Return given sequence with every other item removed """
return seq[::2]
def remove_4_then_every_other(seq):
""" Return... |
c0a8785c13986c9ebf98da68dc5e149a758532f4 | fed5a667d4ae4682bd0a0a6e3df03ff3c8bd4946 | /src/ej_20.py~ | 86533695bc427f155aca8f0603c9d09f4292eff4 | [] | no_license | alu0100828900/prct04 | dbda65a91cbfb8b12413ae650dd4898d715ae63d | 76f23ec95e84783ecc1a0e1a87376cc6b54fab94 | refs/heads/master | 2016-09-06T08:46:06.969738 | 2014-02-28T10:27:22 | 2014-02-28T10:27:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 122 | ej_20.py~ | #! /usr/bin/python
x = -b/a
a = float(raw_imput('valor de a: '))
b = float(raw_imput('valor de b: '))
print 'Solucion: ',x | |
580d115875d55ba6670d56ad387ab49d653de8db | 546999d59ee6a06f7d18a13dd5a6d173940728d5 | /6 kyu. Find the odd int.py | 4c54c8302ec935a033f1a37cf7e81fa32afd8e3a | [] | no_license | Nikita-lys/Codewars | 80fe4d2bb4a9e29af24631d20b1696d6ea03df16 | e97b6d715bfa79cae6351e07b8d8be850b931a75 | refs/heads/master | 2020-03-27T09:34:03.524395 | 2018-10-01T16:12:35 | 2018-10-01T16:12:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 639 | py | 6 kyu. Find the odd int.py | # https://www.codewars.com/kata/find-the-odd-int/
def find_it(seq):
"""
Given an array, find the int that appears an odd number of times.
There will always be only one integer that appears an odd number of times.
:param seq: list of integers
:return: int that appears an odd number of times
""... |
0c4905a871b3e79e147710fcf5c7a8f9453cc295 | b5ed342dfa73a78835f16067cb0f87c2a1352fb6 | /indeed.py | b256dbf72c4879afc0e6d867446fc492b13b5d9e | [] | no_license | clomia/Super_Scrapper | 6461ae76741684ca1024c0257077fdaa498a6009 | 4932f4f983dfc8b6cc475e501dcd2d81f05d0811 | refs/heads/master | 2022-12-23T19:13:57.314284 | 2020-10-01T20:58:04 | 2020-10-01T20:58:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,578 | py | indeed.py | import requests
from bs4 import BeautifulSoup
LIMIT = 50
URL = f"https://www.indeed.com/jobs?q=python&limit={LIMIT}&radius=25"
def get_last_pages():
result = requests.get(URL)
soup = BeautifulSoup(result.text, "html.parser")
pagination = soup.find("div", {"class":"pagination"})
links = pagination.find_all('... |
4ea5e6b2a89b8201a9cfd8f00f955274a8739b0f | f4aa1885d4121e131c2a580183c6312aeefa8147 | /ch05/myproject_virtualenv/src/django-myproject/myproject/apps/news/urls.py | f824e495f9052b9e67198197230bb64ee331e2ed | [
"MIT"
] | permissive | PacktPublishing/Django-3-Web-Development-Cookbook-Fourth-Edition | 8f09d1ea9b13e8a66fc489fc09c9a5ee8f9968cf | 9371e0ea6f4dc61567bf28299cf57146519e274c | refs/heads/master | 2023-02-20T02:36:51.226985 | 2023-01-30T08:39:30 | 2023-01-30T08:39:30 | 201,903,680 | 189 | 117 | MIT | 2023-02-10T22:45:42 | 2019-08-12T09:54:54 | Python | UTF-8 | Python | false | false | 228 | py | urls.py | from django.urls import path
from .views import ArticleList, ArticleDetail
urlpatterns = [
path("", ArticleList.as_view(), name="article_list"),
path("<slug:slug>/", ArticleDetail.as_view(), name="article_detail"),
]
|
d237e69541ec79f632be63ca7f5b989ab75d3f74 | 5c2aec4770a819a811dcee72133de7d018be00c0 | /valohai_yaml/__init__.py | c7d28b1a59919dc78c6fb3fade64383416008f76 | [
"MIT"
] | permissive | saiprashanths/valohai-yaml | 5a9f375287420f80313a9fd486e2d94ce279ca2d | a15701a49c1fffedc30f939c231be4936d3ab790 | refs/heads/master | 2020-03-09T12:14:12.154586 | 2018-04-04T14:50:18 | 2018-04-04T14:50:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 114 | py | __init__.py | from .parsing import parse # noqa
from .validation import validate, ValidationErrors # noqa
__version__ = '0.6' |
8c964cf09d4403a4e31df43a44e8a0494df9ac7a | 2d43a4bf2d04d74e8d274fc1acb4ea736c68661f | /add_sin_noise.py | a16b5c80f06d209bbd55a4364e8e3ca59b2661f0 | [] | no_license | Nakanishi-Asahi/gazou | a6c24e6fc094e9be2ec6c50b58a7a465e6cb4483 | 99e2e12b4f872d76c121d1a1660383c507cc26a9 | refs/heads/main | 2023-08-28T10:25:55.360120 | 2021-11-06T08:28:43 | 2021-11-06T08:28:43 | 425,193,105 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 526 | py | add_sin_noise.py | import numpy as np
import cv2
import math
def main():
gry = cv2.imread('lena.jpg', 0)
width, height = gry.shape
out = np.zeros((height, width), dtype = np.uint8)
a = 2
b = -3
c = -1000
shuki = 20
noise_strength = 20
for w in range(width):
for h in range(height):
... |
d2fdece5f29af41461d679e94f9a488fd8f9c856 | eda6e9c1294964ca6585e8cd22f05c71cd48d3dc | /filters/oscillatory_hallucination/filter.py | ed29f88223735d82e2cda4c776e4017ac2beccbf | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | dyrson11/NL-Augmenter | b626420adb65ba0d6d52b49aaf11b9741595dc1d | 619bc081fa506778526a1963d19a697367f1d553 | refs/heads/main | 2023-09-01T14:48:32.535605 | 2021-10-03T20:30:44 | 2021-10-03T20:30:44 | 412,922,380 | 1 | 0 | MIT | 2021-10-02T22:11:54 | 2021-10-02T22:11:53 | null | UTF-8 | Python | false | false | 2,251 | py | filter.py | from collections import Counter
from nltk import ngrams
from transformers import BasicTokenizer
from interfaces.SentenceOperation import SentenceAndTargetOperation
from tasks.TaskTypes import TaskType
class OscillatoryHallucinationFilter(SentenceAndTargetOperation):
"""N-gram Count based Heuristic for Detectin... |
308a2e1301c720a4a78182563b8778d2b58a537b | 244cfb99a315eaee5ee3703eddb39fc718f2b6de | /test.py | cc60f92abdfd400001067d6a3d83babb11f4c873 | [] | no_license | kvalvika/kvalvika | 07534eade2d0685ab26bb339ba966d71da5872be | dc64bc9cc76dd1a4e44f3dbacde29f04504cb595 | refs/heads/main | 2023-04-04T05:30:06.723555 | 2020-12-15T04:33:33 | 2020-12-15T04:33:33 | 317,901,504 | 0 | 0 | null | 2020-12-15T01:13:56 | 2020-12-02T15:14:38 | Python | UTF-8 | Python | false | false | 36 | py | test.py | print("hihihihi")
print("hihihihi")
|
cc5e20811ea61c220e34a701d951fca523d391e2 | d94835fb59f2ebd3f5e736860f05f0b9451d43e9 | /Program18.py | 8f41fd79de3adc58eef7360bdd8d71572b9b4401 | [] | no_license | vattikutipujitha/Pythonprograms | 4869c828a41290e6d7cc84142a514f995b8396b8 | 8fd6f5a03fa6e8e15786745fa46271693c22f890 | refs/heads/main | 2023-04-25T20:59:37.428815 | 2021-05-26T03:38:14 | 2021-05-26T03:38:14 | 370,895,920 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 96 | py | Program18.py | #print individual characters
name=input("Enter String Value")
for ch in name:
print(ch)
|
32341bc385a2561a11218e80a215da38b7a7061f | 9aa6f8d6657752df89995c9967a13232a0da8aca | /polynomial1.py | 168a42fb2bbcf8f525a5bc46dcdee655cac4eb20 | [
"MIT"
] | permissive | preethamsridhar/advancedPython | 1b2ae1f96072e943d8690ecaf84e4949364c381e | af340f25697666695c45bf4226630bb589b4f332 | refs/heads/master | 2020-05-18T05:44:26.301642 | 2019-05-03T07:40:43 | 2019-05-03T07:40:43 | 184,216,835 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 256 | py | polynomial1.py | # -*- coding: utf-8 -*-
"""
Created on Thu May 2 18:06:10 2019
@author: preet
"""
import numpy as np
import matplotlib.pyplot as plt
def p(x):
return x**4 - 4*x**2 + 3*x
X = np.linspace(-3, 3, 50, endpoint=True)
F = p(X)
plt.plot(X, F)
plt.show()
|
852c56231c2c4724df05891966b539806edf678c | 33e94218ad6ea0976602ccd6547e5e72c12cd67d | /blogApp/views.py | 4552773c67308f049e790eabbad7806d53a27c6f | [] | no_license | DiegoRojo99/BlogDjango | f6b994345879b06effd9caa6ad2c7fa5fa4e3270 | 47ecb71bb50bdf9b27d8c9a7d1b3591e71c51dd1 | refs/heads/main | 2023-01-19T10:11:27.227263 | 2020-11-18T09:37:32 | 2020-11-18T09:37:32 | 307,075,522 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,107 | py | views.py | from django.shortcuts import render
from django.shortcuts import get_object_or_404, get_list_or_404
from datetime import datetime
from .models import Post, Team, Theme, Tag, Division, Conference
# Create your views here.
# Devuelve los titulos de los posts
def index(request):
posts = get_list_or_404(Post.object... |
7853cfe32ccb28954d4175a592d16ab8e073de27 | 2ecc51a25ae70ec88414ee00a02fe0fdc8439248 | /nodes/test_airframe_tf.py | 7311b54806f9206557b5b24b16c8df2cfa9b4223 | [] | no_license | olinrobotics/auto_land | 6ed7d5e8410f0177520a0227189b0581441cd92e | b547c43bfa7855f2fae9e95b46867916bde7a2fc | refs/heads/master | 2021-01-09T05:41:36.608411 | 2017-07-30T19:01:15 | 2017-07-30T19:01:15 | 80,782,177 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,017 | py | test_airframe_tf.py | #!/usr/bin/env python
import rospy
import math
import tf
import geometry_msgs.msg
import random
world = "/local_origin"
airframe = "/fcu_utm"
class tf_camera_mngr:
def __init__(self):
rospy.init_node('tf_test')
#self.listener = tf.TransformListener()
self.broadcaster = tf.TransformBroadc... |
6eabce036e11cc8e8a81a86d908d35203350e9a6 | 73b19c6b8a3dff698df0624b959bff15bc7745d5 | /src/ch05/__init__.py | 291e0987b9f0ebebbba30ee3879f5118d077e4e2 | [
"MIT"
] | permissive | JoseALermaIII/impracticalpythonprojects | ac154f862569660d62246234fc078de74183cfc6 | 0c22c20618243f576f58e8c8bdfb9ce4cd46be5a | refs/heads/master | 2020-05-19T18:42:18.502367 | 2019-10-25T22:07:14 | 2019-10-25T22:07:37 | 185,157,595 | 0 | 0 | MIT | 2019-10-25T21:49:45 | 2019-05-06T08:42:21 | Python | UTF-8 | Python | false | false | 17 | py | __init__.py | """Chapter 5."""
|
dae3a4a51ef5f30b9741746e6bbe1c04f3f12554 | 022378a5bfc98d38150a1d571ef120aa2526c1db | /CS 260/HW2/pointerqueue.py | 76ac84dc7232fe44eac84c706ba818651e6bf206 | [] | no_license | Liahm/School | c5dca9c1284ac1f1a99bf59cec734bc40ffbc5df | f886a49d860df102e30ecd499a0292dc0915fd06 | refs/heads/master | 2020-06-13T04:42:10.029285 | 2017-04-30T22:33:49 | 2017-04-30T22:33:49 | 75,446,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,957 | py | pointerqueue.py | # By Eric Lee
# Class: CS 260
# 1.=(10 points) Queues: one implementation, pointer (pages 57-60), operations: FRONT, ENQUEUE, DEQUEUE, EMPTY, MAKENULL,
class N:
def __init__(self):
self.cargo = None
self.nxt = None
def __str__(self):
return str(self.cargo)
class Q :
def __init__(self):
... |
d05e8f648a7cda33e39c1eb3a0ec84469872d4b8 | 67a65398634a37ed22bcfcefd6a5ee7b2738c0ba | /travelItenerary/iteneraryApplication/get_POI.py | d508577c69f6ed4950dce0f470037b32ce583c06 | [] | no_license | adtseven7/city-itenary-project | 8eea5d7ccc4f2ea9e69d82646e6d1823fb26e294 | f732366d3e63efd7d602abdd3f7fda8f6002b14e | refs/heads/master | 2020-03-27T04:56:13.669657 | 2018-08-31T06:53:34 | 2018-08-31T06:53:34 | 145,980,160 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 277 | py | get_POI.py | from .models import City, PointOfInterest
def get_POIs(city):
POI_list = PointOfInterest.objects.filter(POI_city = city)
return POI_list
def get_POI_object(POI_name, city_name):
POI = PointOfInterest.objects.filter(POI_city = city_name, POI_name = POI_name)
return POI[0] |
70d3f1bb7d57b3dba2c11bae74757e1f5f19d71c | 25d8d13add310c874223f8e1d462b3585afeea43 | /stock/admin.py | 44ca8fe7e549e369ab4781f913daa60cef844742 | [] | no_license | KarymAidary/ecomarket_backend | 24427bfd218f3f236d8dbfc410b236938e066293 | 14d1361a88499de5dfd89bacbb25c2078c27af46 | refs/heads/master | 2020-04-27T08:06:43.783784 | 2019-03-01T19:28:28 | 2019-03-01T19:28:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | admin.py | from django.contrib import admin
from .models import Category, Product
class CategoryAdmin(admin.ModelAdmin):
list_display = [field.name for field in Category._meta.fields]
class Meta:
model = Category
class ProductAdmin(admin.ModelAdmin):
list_display = [field.name for field in Product._meta.f... |
4a221af2d431d04e7c53a0c39f888a47fa887d82 | 3416b95d38c6beafa486132f807782e0ebbdbd8a | /CSC148/exercises/ex4/tree_ex_test.py | a13bda9be3a1fb58d61f1f00698e12bb9a551bf1 | [] | no_license | stroudgr/UofT | f31956d05b87d20cf7e76c3af5c7eee1b9e055a4 | 137f3d22775827ff3a70d402dacfa8d5cc8935ca | refs/heads/master | 2021-05-01T21:33:27.059333 | 2019-01-11T00:47:23 | 2019-01-11T00:47:23 | 69,030,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,909 | py | tree_ex_test.py | import unittest
#from tree_ex import Tree, to_tree
from submission import Tree, to_tree
class TreeEqTest(unittest.TestCase):
def test_ones(self):
tree1 = Tree(1)
tree2 = Tree(1)
self.assertTrue(tree1 == tree2)
def test_empty(self):
tree1 = Tree(1)
treeEmp = Tree(None)
... |
84919b0b4d2bd2932fbcb5e653725869c8555cc3 | d5699b091ecc04b506e22357184bf33b886e75e3 | /src/process/count_number_of_occurances.py | 1bdbd0c4917072b73c24d50b1619319f3343d0c7 | [] | no_license | chathaway-codes/gutenberg_readability | 84dc5597fc8a835bca10aa655589f8c01c3ebdb4 | 21a435dcd6a500515aeb6019b707020a140230ea | refs/heads/master | 2021-05-30T20:35:26.097926 | 2015-12-16T05:31:04 | 2015-12-16T05:31:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 561 | py | count_number_of_occurances.py | import unittest
from process.story import Story
def make_main(list_of_phrases):
def main(book):
adjectives = 0.0
for word in book.pos_words:
if word[1] in list_of_phrases:
adjectives += 1
return adjectives/len(book.sentences)
return main
class AverageNumberO... |
e63333a1e1107009196f7e72541454401142edc5 | e2fefc026aecafbec251f3f914f9e87d37760160 | /2.x_th_smallest.py | 05982396e8ab823a686ccd63d1c32973f4bc1a29 | [] | no_license | livetoworldlife/week02_pycodersnl | e79fe7a76a74d9b10122f5c5ebbb375c315eeb47 | 0482ffe8c747b2b607be587f174e5b671356591d | refs/heads/master | 2021-02-07T08:50:58.990705 | 2020-02-29T18:40:46 | 2020-02-29T18:40:46 | 244,005,280 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 936 | py | 2.x_th_smallest.py |
use_list = []
use_items = ''
number = int()
# Enter the list items until q
while use_items != 'q':
use_items = input("Enter the list items as a number: (to stop the program please enter 'q'): ")
if use_items != 'q':
use_list.append(int(use_items))
else:
use_list.sort()
... |
2fd49d341d9cdc20527957ef193802791041b36c | c8e8a67966687069ada13d37de9c56e951dc5338 | /多层感知器/mlp数字识别.py | 2860bfd0e000aaaa125ddb7a809f1f295199001b | [] | no_license | wangjue666/Machine-learning | d4bb4cf071816f47987938b028237e386b85e964 | 3408894f55d9a8666c23fb7e6fd806ca56668ad1 | refs/heads/master | 2021-07-05T11:12:29.298437 | 2020-11-21T04:17:07 | 2020-11-21T04:17:07 | 204,665,595 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,621 | py | mlp数字识别.py | from keras.datasets import mnist
from matplotlib import pyplot as plt
from keras.utils import to_categorical
from keras.models import Sequential
from keras.layers import Dense,Activation
from sklearn.metrics import accuracy_score
(X_train,y_train),(X_test,y_test) = mnist.load_data()
print(type(X_train), X_train.shap... |
3f09804b595b0cd92c135a2b8f369a498e1c92cc | 78c473d35fe56fa41a0690f451b9041389527226 | /train_refcoco.py | 57748dd50724d184d27cecc6c24124744e32eeb0 | [
"Apache-2.0"
] | permissive | fabianzhafran/refer | defeb259865cdf2bbf6e930f3a1712c4fead90c2 | de1d6aff4504f7c0cb744a767c71d110549eddf8 | refs/heads/master | 2023-07-15T20:45:47.775148 | 2021-09-05T02:20:25 | 2021-09-05T02:20:25 | 296,656,357 | 0 | 0 | Apache-2.0 | 2020-09-18T15:13:41 | 2020-09-18T15:13:40 | null | UTF-8 | Python | false | false | 5,506 | py | train_refcoco.py | from refer import REFER
from pprint import pprint
import detectron2
from detectron2.utils.logger import setup_logger
setup_logger()
import numpy as np
import os, json, cv2, random
from detectron2.structures import BoxMode
from detectron2 import model_zoo
from detectron2.engine import DefaultPredictor
from detectron... |
bce5ac4131456e1c87dcd24a2f697d4ba7d59631 | 4009c4af958fea9f35165e0da27d55f72e8f04f5 | /LeaflyStrains/LeaflyStrains/pipelines.py | d6d5563ed18b13c9f0ed5895c58bbda307d1c842 | [] | no_license | MatthewChow/URAP | dc327acc4a26a551a422e87d5b7916529f20d083 | 62b95fd06bd3a04e9a07ecfd78cdad7853d26b56 | refs/heads/master | 2021-01-18T18:16:52.650240 | 2014-05-05T02:27:26 | 2014-05-05T02:27:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,117 | py | pipelines.py | # Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
from scrapy import signals
from scrapy.contrib.exporter import CsvItemExporter
class CSVPipeline(object):
def __init__(self):
self.files = {}
@... |
49abe536aa5d8c957ea6099a69e00f5bba6edc56 | 981f311db7905668a05323c7b745f41c7be2e163 | /TestingRunner/TestingRunner/settings.py | a972afb303de3c4fcd4fd381ab02aef7864cef7d | [] | no_license | zoeTq/DEMO | 2200af0b6fcf12f57c762638d7fc0dadbf8a4b3b | ed3df5f96f55e0c8c00ef615aba09c3c9da9e827 | refs/heads/master | 2023-03-21T17:44:08.533203 | 2021-03-13T04:36:09 | 2021-03-13T04:36:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,511 | py | settings.py | import os
from pathlib import Path
import djcelery
from django.core.wsgi import get_wsgi_application
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = '(drs1ja8bi3#79az(t6fl13&1hmwqmbn3=%7z%ln!_4$fwd1x*'
DEBUG = False
ALLOWED_HOSTS = ['*']
INVALID_TIME = 60 * 60 * 24
INSTALLED_APPS = [
'django.... |
f315e12db11e612de956a0cd0940011eac3bc0c8 | 0c2a3d566ef2984085358f2c8381eef3925a5829 | /predicting with cifar10.py | 9acb24bf1c7545d5160bc7e4dc9657d1aa9ff7fb | [] | no_license | Ramstein/DCNN-learning-with-keras | ec2dd2509ea2772b0a4b5270bc404f3a672c5685 | 8b6009345745869cc4e4f1e2703f001db2ee707b | refs/heads/master | 2023-08-05T08:18:06.479554 | 2021-09-07T18:17:57 | 2021-09-07T18:17:57 | 404,080,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 876 | py | predicting with cifar10.py | import numpy as np
import scipy.misc
from keras.models import model_from_json
from keras.optimizers import SGD
#load model
model_architecture = 'DCNN_for_recognising_digits_.ipynb'
model_weights = 'cifar10vgg.h5'
model = model_from_json(open(model_architecture))
model.load_weights(model_weights)
#load images
img_n... |
eb03788cecf99cf74c5eb48e83237163a45eb5ba | 50106d3b4996c56cd625ae5cebbd9e8175d76e4f | /jobadvisor/common/pagination.py | aacdcf4e8fdc7cf85f9128ad422ab7ff8eb5675d | [] | no_license | ewgen19892/jobadvisor | 07231a6245024468a33cc6ff734a6276f9b6ec95 | 713b9d84ac70d964d46f189ab1f9c7b944b9684b | refs/heads/master | 2023-05-27T00:15:35.170865 | 2021-06-20T16:31:32 | 2021-06-20T16:31:32 | 378,689,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 955 | py | pagination.py | """JobAdvisor paginators."""
from rest_framework import pagination, status
from rest_framework.response import Response
class JobAdvisorPagination(pagination.PageNumberPagination):
"""JobAdvisor paginator."""
page_size = 6
page_size_query_param = "page_size"
def get_paginated_response(self, data: li... |
79f06746cc73de88996fdd863084ab04412ffdfb | 5a522b3616a9520df94ccc0708cd3f93b1ea5fe9 | /PY4E/wordscount.py | 425ba0dbfe1d63c92cf795d6f83a0f81abc465dd | [] | no_license | skuld1020/PY4E | 80a0c6c71eae8ac4e9178875b20383294e516ef9 | 97032680f328f726994c06f314b32f1706759e6e | refs/heads/master | 2023-02-15T18:38:45.747200 | 2021-01-08T17:50:30 | 2021-01-08T17:50:30 | 272,783,469 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 474 | py | wordscount.py | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 31 18:08:20 2020
@author: Happy sunday
"""
counts = dict()
words = []
while True:
word = input('Enter a word:')
if word == 'done':
break
if word == 'Done':
break
if word == 'DONE':
break
else:
word... |
73b20e331911d11a4aea6b579bbd495ea16a9ee9 | 7a2d2cfbe99a13920e55e462bd40627e34d18f23 | /tests/openbb_terminal/stocks/options/test_alphaquery_model.py | a79113479e10a49c7e7685ffaa3539b74bbd539f | [
"MIT"
] | permissive | conrad-strughold/GamestonkTerminal | b9ada627929dbc1be379f19c69b34e24764efcff | c9aa674d979a7c7fd7f251410ceaa1c8a4ef2e6e | refs/heads/main | 2023-06-24T02:59:45.096493 | 2023-05-16T15:15:20 | 2023-05-16T15:15:20 | 342,313,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 943 | py | test_alphaquery_model.py | # IMPORTATION STANDARD
from datetime import datetime
# IMPORTATION THIRDPARTY
import pytest
import requests
# IMPORTATION INTERNAL
from openbb_terminal.stocks.options import alphaquery_model
@pytest.mark.vcr
def test_get_put_call_ratio(recorder):
result_df = alphaquery_model.get_put_call_ratio(
symbol="... |
ad58efa7c788c023be42b41aca4986c9b0412b7e | 1147d22194888ecf16e456df7e6b42a5f64b26ee | /tests/test_posts/test_end_to_end.py | 384002b9e2b591721cd30608eceeee747f689e44 | [] | no_license | amlluch/kaizen-test | 57e295c737cb9a6c133c371dd55b16841d654b1f | 93bda99716592dfa8ba0675721480cd58c1ff23b | refs/heads/main | 2023-06-25T06:20:52.269837 | 2021-04-12T06:50:21 | 2021-04-12T06:50:21 | 354,229,808 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,296 | py | test_end_to_end.py | import json
import uuid
from base64 import b64encode
from typing import Dict
import pytest
from kaizen_blog_api.controller import create_post, like_comment, list_posts, read_post, update_image
from kaizen_blog_api.post.service import PostService
class TestPost:
@pytest.mark.usefixtures("dynamodb_tables_fixture"... |
613286ddf2142bf23fed7b5420fd1fb912750dd9 | f7e5cc488f74d6fd414c6e2a27d0d1ca8c8c7167 | /ML for everyone lec/lec12-6[stacked].py | 093168db2e10439773a033e797308e191eecfd0e | [] | no_license | cutz-j/ML | 2d4b7cd0c85dddeb3a833246744e22a727cd2208 | 25d9ba7ba8f663cb64360e5a6addd57ff2cdc50d | refs/heads/master | 2020-03-27T10:45:19.497088 | 2019-05-03T09:35:30 | 2019-05-03T09:35:30 | 146,442,895 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,214 | py | lec12-6[stacked].py | ### stacked RNN ###
import tensorflow as tf
import numpy as np
from tensorflow.contrib import rnn
tf.set_random_seed(777)
tf.reset_default_graph() ## reset
sentence = ("if you want to build a ship, don't drum up people together to "
"collect wood and don't assign them tasks and work, but rather "
... |
23910b157cf70b73dfc21b51caa1a5f4826a9c02 | 242f1dafae18d3c597b51067e2a8622c600d6df2 | /src/0100-0199/0162.find.peak.element.py | 7e4225aaf533e89754bd8779bf46dda575975d36 | [] | no_license | gyang274/leetcode | a873adaa083270eb05ddcdd3db225025533e0dfe | 6043134736452a6f4704b62857d0aed2e9571164 | refs/heads/master | 2021-08-07T15:15:01.885679 | 2020-12-22T20:57:19 | 2020-12-22T20:57:19 | 233,179,192 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,653 | py | 0162.find.peak.element.py | from typing import List
class Solution:
def findPeakElement(self, nums: List[int]) -> int:
"""modified binary search.
noticed the condition that nums[i] != nums[i+1], otherwise, say nums = [2] * N, then O(logN) is impossible.
"""
n = len(nums)
if n == 0:
return None
l, r = 0, n - 1
... |
f7bfa3eb8f0cfe656222a163398d09b9c3c158a8 | d51a0c2dce6d093b220da57f8e6a584d6f258678 | /proxy_model/demo.py | 130279635a82354069ceea4bee66296e504ff451 | [] | no_license | zzqFun/DesignModel | 51a503f06bc0dad7b7d34900a63fffa3983edc8b | 293344f4a4953fb9f561bdf6b9ead6fd8719e2bf | refs/heads/master | 2020-05-02T12:40:39.473477 | 2019-03-28T11:13:34 | 2019-03-28T11:13:34 | 177,964,256 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 60 | py | demo.py | # coding = utf-8
from abc import ABCMeta,abstractmethod
|
ce7c4d190332a9860d743ba765473ba414676a3b | accc78671888b5f9b1c882eb7b39c5c8b5672722 | /venv/Lib/site-packages/jy_word/demo_xml.py | 0307027f7b448bde279cf7711aa6981927f2e2be | [] | no_license | ShreyansMutha/Vocabulary-Builder-Using-WhatsApp | 8fd2a648f3d13e6d17451c0468331bf4071c0ba3 | cf3511b5a0fe86481e92ec8f526107369f1bb5e4 | refs/heads/main | 2023-05-04T13:55:32.311401 | 2021-05-24T17:39:41 | 2021-05-24T17:39:41 | 370,435,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297,778 | py | demo_xml.py | # -*- coding: utf-8 -*-
# !/usr/bin/python
# Create Date 2018/8/24 0024
__author__ = 'huohuo'
demo_xml = '''<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
<pkg:part id="pkg_parts"></pkg... |
fd86aff565850c7d4e6ba51be6d09800d1f5f6d4 | 4d9bdc1444ab73858a123b8273b72e1d74a9233d | /courses/CMUSV_Cloud/proj1_1/filter.py | ae9d0bd55f458dbc51a4934d8e7b112b6f77a833 | [] | no_license | vishalpmittal/practice-fun | f7ca1389d758f93ddf2ddc3a58f2592b7caabab4 | 727dec2e23e765925a5e7e003fc99aeaf25111e9 | refs/heads/master | 2022-07-11T18:31:49.574410 | 2022-02-26T23:05:12 | 2022-02-26T23:05:12 | 51,132,794 | 0 | 1 | null | 2022-06-29T19:34:05 | 2016-02-05T07:34:32 | JavaScript | UTF-8 | Python | false | false | 2,792 | py | filter.py | def merge_sort(data_list):
if len(data_list) > 1:
# Determine the pivot point and split
pivot = len(data_list) / 2
l_list = data_list[0:pivot ]
r_list = data_list[pivot :]
# Sort l_list list in-place
merge_sort(l_list)
# Sort r_list list in-place ... |
916102461ae47acd5942b354f8824153f2650f4f | 46d2101a7642730cb9837bbb419ed9d2a6811cbe | /Tilecoder.py | c66a5b7d4d052f225af42ce42427509f565a61ac | [] | no_license | IanWark/CMPUT-366 | fb78b766a226f19d507c84142e9f58db14bf4821 | ba4081fb97ca2df3d72e680682501a8a64f01945 | refs/heads/new- | 2021-01-10T17:56:47.928115 | 2015-11-27T19:32:28 | 2015-11-27T19:32:28 | 45,431,087 | 0 | 0 | null | 2015-11-27T20:49:37 | 2015-11-03T00:27:46 | Python | UTF-8 | Python | false | false | 639 | py | Tilecoder.py | import numpy
numTilings = 8
def tilecode(x,y,tileIndices):
# write your tilecoder here (5 lines or so)
for i in range(numTilings):
xNew = x + (i*0.6/8)
yNew = y + (i*0.6/8)
xTile = numpy.ceil(xNew/0.6) - 1
yTile = numpy.ceil(yNew/0.6) - 1
tileIndices[i] = i*121 + yT... |
dcedc47ab2ccb7d4d2263b001f08aca815af627c | 57cc0e2fc7051f129967ec67ac1ef8e1ee0debb5 | /rest_client/nw_control/params.py | f1145365de67d08f6ba5821139b5a54b628fca47 | [] | no_license | DangerFunPants/cpsc_of_testbed | 0ec93cd7508b9eb30c59cb9877570191ffbd8f1c | 4ce20dfa0c4f012a5d868b29fb894ebc885af0ea | refs/heads/master | 2022-12-14T12:06:11.231100 | 2020-07-07T18:23:13 | 2020-07-07T18:23:13 | 142,632,611 | 0 | 0 | null | 2022-06-22T02:17:43 | 2018-07-27T23:50:52 | Python | UTF-8 | Python | false | false | 878 | py | params.py |
"""
This file contains static configuration items that are referenced in many other
locations in the application. Ideally these would be determined via some other
means but I haven't thought of a better way to do this yet.
"""
import urllib.parse as url
# DNS Server IP for OpenFlow Network
dns_server_ip = '10.0.0.1... |
8e5c41e3eceac68880fa3a6d51801131747bcb02 | ee948508e03b18d3c22476ddc06aaef8f3725c6e | /control_acero/migrations/0206_auto_20160921_1026.py | 4c6e9152529d724ba501665446ae1f9e7c4f654c | [] | no_license | dannie1310/SAcero | 64a7bb9a87a9beac9b703d5eb4881ec588b1f8d5 | 60a3a4ffd5d9ad2a596fd3c33b652c5bf5abaaba | refs/heads/master | 2020-12-24T08:48:37.902269 | 2016-10-26T22:08:01 | 2016-10-26T22:08:01 | 73,317,364 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,368 | py | 0206_auto_20160921_1026.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('control_acero', '0205_bitacora_justificacion'),
]
operations = [
migrations.RemoveField(
model_name='entrada',
... |
75bba483ee867e04cb264f4790ddef6e499bf00a | 7b7c570b30d6d7a0e9b904c7cb378cfb0d0f0e07 | /tests/utils/test_arguments_utils.py | 552470b0a694739ebb5a1bb4aabf40cf05cecf7e | [
"Apache-2.0"
] | permissive | mlflow/mlflow | ca97bfbbf32f8e59f454e428f5e46eb3d34d062f | 37298ffafcd34002352d01d579d4524790544267 | refs/heads/master | 2023-09-01T13:15:53.902815 | 2023-09-01T09:00:42 | 2023-09-01T09:00:42 | 136,202,695 | 14,102 | 3,748 | Apache-2.0 | 2023-09-14T21:52:42 | 2018-06-05T16:05:58 | Python | UTF-8 | Python | false | false | 1,062 | py | test_arguments_utils.py | import functools
import pytest
from mlflow.utils.arguments_utils import _get_arg_names
def no_args():
pass
def positional(a, b):
return a, b
def keyword(a=0, b=0):
return a, b
def positional_and_keyword(a, b=0):
return a, b
def keyword_only(*, a, b=0):
return a, b
def var_positional(*a... |
2836b6bc62e5ae3d119d92173bc9b70ca7fedd98 | a953eb527cd119f2ddc7097fd9cb7c49123adc47 | /src/lua-board-provider/wscript | 4bc81d80219e72b6200d6effb6763e4e8c69249f | [] | no_license | maghoff/snygg | 7657a4d41fa55df2263e8c1962424ef9fa6fab23 | 3f83863fd9c49acd06974a2f8672431441b2d864 | refs/heads/master | 2023-03-11T10:11:52.406117 | 2018-03-30T08:52:55 | 2018-03-30T08:52:55 | 211,388,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 365 | wscript | #!/bin/env python
# -*- coding: utf-8 -*-
def build(bld):
sources = [
'file_loader.cpp',
'istream_lua_load.cpp',
'lua_board_provider.cpp',
'lua_vm.cpp',
'lua_segment_heap.cpp',
'lua_vec.cpp',
]
obj = bld.stlib(
source=sources,
target='lua-board-provider',
use=[
'board',
'lua',
],
lib=[]... | |
670151cb54279a1b9bbe2b6d860e482358792808 | 5ee7a27cb4dfba9377efebe5b6f7345829edfdbc | /이것이_코딩테스트다_동빈나/04_조건문.py | b30b9f7aedeb23d97d8ecbca8c600abea09b1dd3 | [] | no_license | procendp/Study_alone | fb45da3dcbfe7254c0c9cc90ad2730175b79139d | 2d23f88f1d2661d0fbde76331f17b1ea32a67439 | refs/heads/master | 2023-01-21T20:27:09.448529 | 2020-12-06T09:54:03 | 2020-12-06T09:54:03 | 295,696,065 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | 04_조건문.py | # 조건문
# pass 키워드
# 조건문 안을 지금 당장 처리할 것이 없을 때 사용
a = 5
if a > 7 :
pass
else :
print(a)
# 조건문 한 줄로 표현하기
score = 85
result = "참" if score >= 80 else "거짓" # if 앞이 참, else 뒤가 거짓 |
8c238b59617a5d033749324b81185f56febdb868 | 1bf46ebb8705c08eed1a76325e0b3d9ec30256ff | /server/control/typ/cust/country.py | 46268c4b0cd2942d72ce5e959582af2e55652e7e | [
"MIT"
] | permissive | Dans-labs/dariah-contrib | 96ff101f170911400fe038723a6b8d562e23300a | 4c9bec1b74716947ae822c468de1cd0d963cc377 | refs/heads/master | 2023-07-05T05:09:42.180352 | 2023-03-01T09:17:50 | 2023-03-01T09:17:50 | 220,503,661 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 879 | py | country.py | from config import Config as C, Names as N
from control.utils import pick as G, E, shiftRegional
from control.html import HtmlElements as H
from control.typ.value import Value
CW = C.web
Qq = H.icon(CW.unknown[N.generic], asChar=True)
Qc = H.icon(CW.unknown[N.country], asChar=True)
class Country(Value):
"""Typ... |
83bf498ab81e4cfdb870cea769f62b3a05cfea2a | d5325d6157637c0522eb4e710fe3f5a9b9e81ed1 | /shenfanyi/lstm_tensorflow_timeinput.py | e8bc9d784c283521c4535e1aaf25566717b4fece | [] | no_license | limberc/KDD-2017 | 07732911d33ab55dda6b5449dd80cbb67576587e | 75f65ce5c7cd8889658ad0d49c1f18bec9136a7d | refs/heads/master | 2021-06-15T22:47:27.522034 | 2017-05-02T14:15:16 | 2017-05-02T14:15:16 | 86,591,785 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,472 | py | lstm_tensorflow_timeinput.py |
import tensorflow as tf
from tensorflow.contrib import rnn
import numpy as np
data1 = np.genfromtxt('./data/oneweek1_0.csv', delimiter=',')
data = data1[1:,1:]
# print(data.shape)
# print(data[1])
batch_size = 2
n_steps = 12
n_input = 8
n_output = 1
data_length = 5
x = tf.placeholder("float", [None, n_steps, n_i... |
a07aa27825a5350de9092be7b1154bebf1570ee0 | 490c040344126d7d60fa526bd7cbe2765882bd16 | /util.py | 55ec3aa6c4649bb8861543919035cd9ccad6590f | [
"Apache-2.0"
] | permissive | ricardoduranram/Gender-Recognition | bfec29cfe7a6fef1a96bab7d5c0d0fd910ff64c6 | 33de252cf0edfc753c54384901db4fae412db18d | refs/heads/master | 2020-03-19T02:33:25.696161 | 2018-05-31T23:45:52 | 2018-05-31T23:45:52 | 135,638,941 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,391 | py | util.py | import numpy as np
from scipy import stats
r"""
Axes are defined for arrays with more than one dimension.
A 2-dimensional array has two corresponding axes:
the first running vertically downwards across rows (axis 0),
and the second running horizontally across columns (axis 1).
"""
def isEmpty(data):
... |
ba90bb12fde0ba329ea698cdf00a78dc9174c3cf | e2d115b68a6c81d0781e90e8332a45d8ebd1e4d0 | /utils/mixins.py | f73e19b3ae7871b3b6706d7acfc190859419ff1e | [] | no_license | abdarbl0013/fynd_assignment | fa2b7632e6181068e4a24b8288ae7457f3509101 | 127fd3a4c9af23c4d617f697c8978b6464b1e64a | refs/heads/master | 2020-04-15T05:56:58.154867 | 2019-01-10T05:04:54 | 2019-01-10T05:04:54 | 164,442,888 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 487 | py | mixins.py | from rest_framework.mixins import UpdateModelMixin
class PartialUpdateMixin(UpdateModelMixin):
"""Mixin to partially update the PUT request."""
def put(self, request, *args, **kwargs):
"""
Over-riding `get_serializer`.
All PUT/PATCH requests will be `partial`, ie only those fields ar... |
9a3c970e3667ae97c0a48cca1b047cf6484b8741 | f909ea90a8fa8fddd42adfb9cad429fef963969f | /authapp/admin.py | 18fb682dcd7bd580ed620b3d02eeefe9448cceda | [] | no_license | makssokol/django_basic | 7f955d61257a7a7eafd21fc2d6adde0618ad79f2 | 44cde84d16a2358a2e09bf00c0c18a5445755486 | refs/heads/master | 2022-12-10T19:04:13.345860 | 2020-06-06T03:17:38 | 2020-06-06T03:17:38 | 238,907,996 | 0 | 0 | null | 2020-02-07T11:47:24 | 2020-02-07T11:37:34 | null | UTF-8 | Python | false | false | 98 | py | admin.py | from django.contrib import admin
from .models import ArtShopUser
admin.site.register(ArtShopUser) |
506ba23923208cd48ad0485894ca8b2b835f7f21 | e9228c61710c5031458266abdafe1e3bf88a3201 | /siteUmka/UmkaPage/migrations/0001_initial.py | 5a451783af6ed756240bae9a2b45ac6ac4a528ea | [] | no_license | Erhuero/siteUmka | a2a7cd7065c43e375f3dbf5a7ee157c5b5154a36 | 8ecf4685809c820f369f61e78d00b0a4239c66d6 | refs/heads/master | 2020-09-06T04:00:54.718329 | 2019-12-30T19:11:17 | 2019-12-30T19:11:17 | 220,314,816 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,739 | py | 0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-11-24 20:45
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Cre... |
e96575493d4e014d6fe0fc090f73579c72038e08 | 4daf9a2d104280c030c80173747eedb11c43dfd4 | /Basic's/del_statement.py | 06f9a7928e1345b9edfc9fc44bbca2fc325fb689 | [] | no_license | 8140171224/Data_Structures | efdc1d30e51b5a9164707a1e6a5fd86e8da71321 | 230308957da55dbb04c86ff28a87ef37424814d7 | refs/heads/master | 2020-05-27T18:37:52.932802 | 2019-06-02T04:33:52 | 2019-06-02T04:33:52 | 188,745,646 | 1 | 0 | null | 2019-06-01T11:58:20 | 2019-05-27T00:30:07 | Jupyter Notebook | UTF-8 | Python | false | false | 428 | py | del_statement.py | #!/usr/bin/env python
# coding: utf-8
# In[14]:
# del
a = [-1, 1, 66, 25, 67, 555, 1234, 5678.5]
# In[15]:
del a[0]
# In[16]:
a
# -1 = index(0) removed
# In[17]:
print(a[2:4])
del a[2:4]
# In[18]:
a
# 25, 67 = index(2), index(3) are removed
# In[19]:
del a[:]
#empty
# In[20]:
a
# In[21]:
... |
a27e7d80f61e758b6b27565cbbbbd2684199556c | b607a019709c17d96110d77062a62b3f024a4ed3 | /Comment.py | a7ca16afeffa1190804b7fd6ab633349ba716c00 | [] | no_license | DevBryson/Movie-Retile | bd9a88c0c514aba6d9179c9b64e2206cf511a531 | 9752593d867a375583065b1fbd8717332e205d0d | refs/heads/master | 2020-03-30T06:41:32.664369 | 2018-09-29T16:15:12 | 2018-09-29T16:15:12 | 150,881,415 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | Comment.py | # !/usr/bin/env python
# _*_ coding:utf-8 _*_
class Comment:
def __init__(self, movie):
self.movie = movie # 设置评论所属的电影
self.user_avatar = '' # 用户头像
self.user_name = '' # 用户名
self.user_id = '' # 用户Id
self.user_loc = '' # 用户所在城市
self.rate = '' ... |
55c2bf914a77c573d1b6835f54c82921d9fa6ad6 | 80301f1cffc5afce13256e2ecab6323c5df00194 | /en.3rd/py/C2219.py | 316a2253651159298d6ed1fad17d336486041b7f | [] | no_license | ZhenjianYang/SoraVoiceScripts | c1ddf7c1bbcb933243754f9669bd6b75777c87b9 | 94a948090aba0f63b10b2c69dc845dc99c822fc4 | refs/heads/master | 2023-04-18T04:54:44.306652 | 2023-04-06T11:15:17 | 2023-04-06T11:15:17 | 103,167,541 | 43 | 11 | null | 2021-03-06T08:52:54 | 2017-09-11T17:36:55 | Python | UTF-8 | Python | false | false | 14,279 | py | C2219.py | from ED63RDScenarioHelper import *
def main():
SetCodePage("ms932")
CreateScenaFile(
FileName = 'C2219 ._SN',
MapName = 'Ruan',
Location = 'C2219.x',
MapIndex = 84,
MapDefaultBGM = "ed60015",
Flags ... |
ecbca04a58c19469e63ee2310e2b2f6b86c41199 | eec89708cc305573df9c5c45aabd8a6419d200eb | /Final Repository/CSV_normalize_class.py | 2152f468594873b805cf15f496dd0d6961c4dacb | [] | no_license | koprisko/CueProject | ea26b1e87b7495e96a03ff1d7feef074ca2f6e02 | 52b16be3e8d62f3e98415c51533f949485799685 | refs/heads/master | 2020-04-19T08:31:47.914867 | 2019-05-09T19:41:37 | 2019-05-09T19:41:37 | 168,080,216 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,387 | py | CSV_normalize_class.py | # -*- coding: utf-8 -*-
"""
Created on Wed May 8 15:05:51 2019
@author: Brian Heckman and Kyle Oprisko
"""
import csv
"""this file opens a csv file created in the csv creator class. The main purpose of this class is to
normalize the data in the csv file, so that it can be read by the neural network.
"""
... |
9a7994a1e51c9cf7fe7d8b50ab26fa3d789fc8e5 | 831c1e735a1b7d1bc6aa779bba88d3d3efe42565 | /tests/middleware/test_static.py | ebc5681933f228f94e5eb26e95d80e8270c586b0 | [
"Apache-2.0"
] | permissive | pyGrowler/Growler | a46db1909d1877d332c103194dd1dabb1f8f3b15 | 5492466d8828115bb04c665917d6aeb4f4323f44 | refs/heads/dev | 2023-03-08T01:10:20.093556 | 2020-03-08T07:51:41 | 2020-03-08T07:51:41 | 25,556,740 | 814 | 38 | null | 2016-05-16T05:22:07 | 2014-10-22T02:11:12 | Python | UTF-8 | Python | false | false | 2,063 | py | test_static.py | #
# tests/middleware/test_static.py
#
import pytest
import growler
from pathlib import Path
from unittest import mock
from sys import version_info
from growler.middleware.static import Static
@pytest.fixture
def static(tmpdir):
return Static(str(tmpdir))
def test_static_fixture(static, tmpdir):
assert isin... |
a319ebb05e9034f19aef39bd46830c8a607ed121 | fcbd7b8ad9a7462915889e2e74780aef17dd531a | /ex34.py | 2fe6de44b33cb52f29036a2f1ff64f370e219f31 | [] | no_license | superheroCEO/python-hardway | 93a47585c9f662aee30a47692f47a70f8e7202d0 | deed84d0492d0c6938e5e4f0589c4b4a75fd5035 | refs/heads/master | 2021-01-19T06:36:04.849700 | 2016-06-21T23:17:13 | 2016-06-21T23:17:13 | 61,088,298 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | ex34.py | animals = ['bear', 'python', 'peacock', 'kangaroo', 'whale', 'platypus']
The animal at 1.
The third (3rd) animal.
The first (1st) animal.
The animal at 3.
The fifth (5th) animal.
The animal at 2.
The sixth (6th) animal.
The animal at 4.
|
cc6cef70381bb08247720ec32b7e8fe79ed7123d | d8f5328d9f3be9a7aacfcb052a9c742fc0921782 | /paranthesis_match_position.py | 1ae7228b4b0537e8aebd20f77bfcd9db57d94175 | [] | no_license | kodavanty/interview-cake-answers | 384cd4c5b4e5924a976810a55db01cda3d9fb47f | 6ee7eb6884026d509a84b191a6b8577aae57ed32 | refs/heads/master | 2021-01-19T10:39:21.292840 | 2017-02-16T16:06:37 | 2017-02-16T16:06:37 | 82,194,621 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 831 | py | paranthesis_match_position.py | #!/usr/bin/python
import sys
OPEN_BRACES = ['{', '(', '[']
CLOSE_BRACES = ['}', ')', ']']
def match_paranthesis (s, pos):
stack = []
for i,c in enumerate(s):
if not c in OPEN_BRACES and not c in CLOSE_BRACES:
continue
if c in OPEN_BRACES:
stack.append((i, c))
... |
ddaba7a8b53072da36224dd4618696ebf0e9a4e4 | a1fe4294b5c61fa9f51c98772f36fb9c105dca8f | /autotest/t007_test.py | c47475991217a90be87369d5a7b1b29f4a0b1619 | [] | no_license | rabbl/pymake | 790a9eb42a1972fc8432d230303a12ad2c6e223c | e0200c8e71181c6ec995be188f10b6f0cd7724d3 | refs/heads/master | 2020-03-26T23:23:19.471207 | 2018-08-10T22:33:05 | 2018-08-10T22:33:05 | 145,537,823 | 1 | 0 | null | 2018-08-21T09:09:13 | 2018-08-21T09:09:13 | null | UTF-8 | Python | false | false | 4,720 | py | t007_test.py | from __future__ import print_function
import os
import shutil
import pymake
import flopy
# set up paths
dstpth = os.path.join('temp')
if not os.path.exists(dstpth):
os.makedirs(dstpth)
mp6pth = os.path.join(dstpth, 'Modpath_7_1_000')
expth = os.path.join(mp6pth, 'examples')
exe_name = 'mp7'
srcpth = os.path.join(... |
da3be0d3b815e11d292a7c7e8f5ce32b35580f98 | 30e83ff5252aea9afb78dc2f327b04f5548b6cbb | /Week3/Case Study 1/Exercise 1/Ex1.py | 39ac9b3f0f6ff8e86e3b82a69240c6dad89c8e51 | [] | no_license | amartinez1993/Using-Python-for-Research | a7d42f8c209dc5aeb59498c4ef36f1617daca30e | 4cd94b830e0eb7b71d3d1703185f531f375454a3 | refs/heads/master | 2021-04-06T02:03:04.517845 | 2018-03-16T13:47:14 | 2018-03-16T13:47:14 | 125,047,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 93 | py | Ex1.py | # Let's look at the lowercase letters.
import string
alphabet = " " + string.ascii_lowercase
|
299432b095f16c3cb4949319705800d06f534cf9 | 1608dfc2ddbccd9587de08bb0e5d41f33d729ec9 | /validation/Paws/pyps_modules/paws_out_regions.py | c004b193d44457b00b58fea8b1aab79e374bc1e6 | [] | no_license | dkhaldi/PIPS_TaskParallelization | d623d3ae334d0e1c63772bae86bb0c115e928708 | f324f3374cc8cbb58498b9dde172b1e7596abe1c | refs/heads/master | 2020-07-03T14:16:30.427670 | 2016-11-18T21:44:34 | 2016-11-18T21:44:34 | 74,167,837 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 433 | py | paws_out_regions.py | from __future__ import with_statement # this is to work with python2.5
from pyps import workspace, module
def invoke_function(fu, ws):
return fu._get_code(activate = module.print_code_out_regions)
if __name__=="__main__":
workspace.delete('paws_out_regions')
with workspace('paws_out_regions.c',name='paws_ou... |
c1bb7b579e6b251ddce41384aef1243e411c5d0e | 858b90687cc84eb430780ffe2a73d5b4aba3d639 | /Travel.py | c9c7eb05d5519f45766f6cbe4dcdd98c823549c4 | [] | no_license | Eyesun23/Travel-Time-Machine-Learning- | 81585e2ea46234ac0c0d8f3d2733eb6bbbb52118 | 9c8e74c584426e294d1e9222f1b8f69afdeac7f5 | refs/heads/master | 2021-09-08T04:24:14.804756 | 2018-03-06T23:04:47 | 2018-03-06T23:04:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,794 | py | Travel.py |
# coding: utf-8
# ## Estimating Travel Time
#
#
# The objective of this document is proposing a prediction model for estimating the travel time of two
# specified locations at a given departure time. The main idea here is predicting the velocity of the trip. Given the distance between starting and ending point of t... |
ae84b449c8919f14954633b14993e6291501bc24 | 2e69876729b1334fddfcd411532253082864ec81 | /Pit/input.py | 4f20886b30668bdbc9b470cbe58758ed78f8591e | [] | no_license | alexanderajju/Pit | 0bb49ad7b0a2f9585cb19b9b57ac8551ed7459ea | 3f6ebc2341291544b2251c8cfcebee336b67116c | refs/heads/main | 2023-08-15T21:22:38.240536 | 2021-09-26T05:19:50 | 2021-09-26T05:19:50 | 410,457,144 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 464 | py | input.py | import requests
def login(username, password):
data = {'login':username,'pwd':password,'lang':''}
r = requests.post('http://dms-pit.htb/seeddms51x/seeddms/op/op.Login.php', data=data, allow_redirects=False)
if r.headers['Location'] == '../out/out.Login.php?msg=Error+signing+in.+User+ID+or+password+incorrec... |
0fe830800a613e2242a9f8b7e5d255b5703e99a0 | 8f48d12b88048e424ebb0d72ca6dfab5cf12ae0f | /0600_0999/908.py | 52f2e9a39de33493b4bef2b15b276b84730093ed | [] | no_license | renjieliu/leetcode | e1caf13c18a8107ed9252588b339fb76bcb1b246 | 4668b64fcb9320b6c316d8608fc61911ce43b6c7 | refs/heads/master | 2023-03-18T18:16:06.187741 | 2023-03-14T20:31:59 | 2023-03-14T20:31:59 | 128,823,819 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 583 | py | 908.py | def MaxMin(input:"List[int]"): #this is to improve the performance , to get the max and min in one run.
max = input[0]
min = input[0]
for i in input:
if i > max:
max = i
if i < min:
min = i
return [min, max]
def smallestRangeI(A: 'List[int]', K: 'int'):
bound... |
2bf17b8fc11cc2087c294edc977c1abc80adfe7c | ee3db298ea1524efdb088d0349d400c058b496ff | /main.py | 7195c670e439bec34a9bd7f8ad6923d114584257 | [] | no_license | Piyush3dB/NegativeGroupDelay | fc0baf7a23e6fd2345ae7cfa2b824380f924f368 | c6f1ebf96558e05d09ef13cd9c4209ac5ad456db | refs/heads/master | 2016-09-07T18:49:49.998339 | 2015-04-13T15:05:50 | 2015-04-13T15:05:50 | 32,418,986 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,139 | py | main.py | #!/usr/bin/env python
import numpy as np
from scipy.signal import lfilter, tf2zpk
import pdb
import matplotlib.pyplot as plt
import pdb
# Sample transfer function H:
n = 400;
f = np.logspace(np.log10(1), np.log10(1000), n); # sample with logarithmic frequency scale
w = 2*np.pi*f;
R = 3000
L = 100
C = 0.098e-6
... |
73a2f349a4c00b65d8964141c6228e69b2d93b97 | c5cad3728f657d87357180a1da20a05cb129be2b | /Programs/test_matinv/matinv.py | deebad0f1af5e770e7313392c68e31421a44e444 | [
"BSD-2-Clause"
] | permissive | Alex-Derhacobian/cerebro | 74260b644a18bdfe576e0752af6d31d29e714eb8 | acd6ba33e69f5acba35a8b5f5551ba6216e70171 | refs/heads/master | 2023-07-17T21:53:40.746505 | 2021-09-09T14:02:33 | 2021-09-09T14:02:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,980 | py | matinv.py | import numpy as np
def transposeMatrix(m):
return map(list,zip(*m))
def getMatrixMinor(m,i,j):
rows = len(m) - 1
ret = [[0 for u in range(rows)] for v in range(rows)]
for r in range(len(m)):
for c in range(len(m)):
if r != i and c != j:
rr = (r > i) * -1 + r
... |
b07f794f6a5893bd90ccd77772c2e230bca8e59c | 790ff62f825a50b1596d6a1f28566a03a8961b38 | /integration_tests/search_test.py | 649064935dcd2da4cf6ba8f2ae15e7939c97dbe3 | [
"MIT"
] | permissive | python-cognitive-search/azuresearch | ef4332f819c3d6fcdea5d9c48bcb5f4813902307 | d2a477aa050d3cff2f95a25cb53e8162859db98d | refs/heads/master | 2020-04-16T10:05:06.332991 | 2019-06-07T08:12:50 | 2019-06-07T08:12:50 | 165,489,669 | 9 | 0 | null | 2019-06-07T08:12:52 | 2019-01-13T09:53:59 | HTML | UTF-8 | Python | false | false | 3,555 | py | search_test.py | import os
import time
import pytest
from azuresearch.data_source import DataSource
from azuresearch.field_mapping import FieldMapping
from azuresearch.indexers.indexer import Indexer
from azuresearch.indexes import StringField, Index, Int64Field, \
DateTimeOffsetField
from tests.test_helpers import get_json_file
... |
9e2975693e32ba44c6b768a626dcdf649b09faf5 | aa793438bf0c639273711a6d7ecbea5dd66506be | /code/check_if_closed.py | ba6ad804d59243c94edd775a51c7f892a71eef5f | [] | no_license | amnh/BridgeUP-STEM-Oceans-Six | 51c1d83badb9a2b27800aa64d8af820d7d41451f | 29b3c36d55fc51d7872970efc18f6cc40bb209eb | refs/heads/master | 2021-04-12T01:55:42.875390 | 2019-05-31T21:10:05 | 2019-05-31T21:10:05 | 125,901,771 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,302 | py | check_if_closed.py | from netCDF4 import Dataset #Tool we/Users/student/Desktop/BridgeUP-STEM-Abbott/labs/eddy_contours_script_032819.py need to load in our nc dataset
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
dataset = Dataset('../datasets/Bermuda_data_SLA.nc') #Loading in our dataset
lat = dataset.variables[... |
c958e131ed8cac30c545d77bf7e642596dbeb292 | 09629a4002273c0c374c04cb687bab613e83c1f8 | /Python_Functionals/map-and-lambda-expression.py | d6d58e2a06d6dc902e9cc5ce2598171664a709b6 | [
"MIT"
] | permissive | Shivansh2407/hackerrank_python | 4071add85653aba9106a2c4786967ec15c96aa23 | 05e51df332539288aa24f6d9fbdd4620bb7754f5 | refs/heads/master | 2020-04-01T04:20:48.619389 | 2018-06-11T11:14:10 | 2018-06-11T11:14:10 | 152,859,449 | 0 | 0 | MIT | 2018-10-13T10:10:02 | 2018-10-13T10:10:02 | null | UTF-8 | Python | false | false | 278 | py | map-and-lambda-expression.py | """
https://www.hackerrank.com/challenges/map-and-lambda-expression
Language: Python 3
Sample Input
5
Sample Output
[0, 1, 1, 8, 27]
"""
fib = lambda n: (0,1,1)[n] if n<3 else fib(n-1)+fib(n-2)
fib_no = map(fib, range(int(input())))
print(list(map(lambda x:x**3, fib_no)))
|
c8e09ef845aa6fe40949561050b4a5e398d7fde6 | 73f2b6c0768c8d31e76f7ebc95903878b33283b3 | /robot/RemoteControlsHandler.py | 49c864ad60ef581241c27dc0e7dac9362d0bb085 | [] | no_license | schlank/UberPi | 88086df2a9e7899d67fdd2827693eecf349643f0 | 6a26815fc47f0789b43c1f706b7f57e46450e931 | refs/heads/master | 2020-06-30T00:58:03.899488 | 2016-12-20T03:00:41 | 2016-12-20T03:00:41 | 65,958,013 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,213 | py | RemoteControlsHandler.py | import pickle
import socketserver
import os
from client.LightStatus import LightStatus
from client.RacingWheel import RacingWheel
from client.ServoStatus import ServoStatus
from robot.Servos import Servos
from robot.Lights import Lights
from robot.Motors import Motors
def get_cpu_temperature():
res = os.popen('v... |
2b0e41acf662825033a1046c119a51bc63333f17 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p00000/s334133671.py | 43eb0f6c260ce361bf0f78d5e5aea0201f55e82f | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 80 | py | s334133671.py | for x in range(1,10):
for i in range(1,10):
print(f"{x}x{i}={x*i}")
|
273b25e4f45b36aee486a63c0f4bf5032a38729d | d2e9912dff52f3093efdff4504d3632274b5de02 | /tests/test_transformers.py | 5c959128f59a1712f106cb7b87e5096b21e99619 | [
"BSD-2-Clause-Views"
] | permissive | postfalk/django-etl-sync | 456fb484b735f8553ca90b082d884106ad2b9e15 | 5a5d864d02b7830dc75ca42609fee9f9051a8802 | refs/heads/master | 2021-06-20T22:39:31.263215 | 2019-06-14T15:34:23 | 2019-06-14T15:34:23 | 12,714,312 | 32 | 6 | NOASSERTION | 2021-06-10T18:15:09 | 2013-09-09T22:14:55 | Python | UTF-8 | Python | false | false | 2,354 | py | test_transformers.py | # Python 3.x compatibility
from __future__ import absolute_import
from unittest import TestCase
from etl_sync.transformations import Transformer
from django import forms
from datetime import datetime
class MyForm(forms.Form):
name = forms.CharField(max_length=10)
date = forms.DateTimeField(required=True)
c... |
753dfe20a0a155ec438d2181927901eb02667efe | 29e06be5515737c8452ac2b7e415765c38410ccb | /actions/timed_reminder/remove_widget.py | 46bf1b68df8b982c169993874b3872128b41a886 | [] | no_license | liaokongVFX/quicker | 73dbd68414ceac0a7f4649608aef83989e89653a | fabb28881cf02f06b6f26c863a0c420a3372d555 | refs/heads/main | 2023-03-03T14:13:33.496222 | 2021-02-17T11:12:35 | 2021-02-17T11:12:35 | 332,411,019 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,704 | py | remove_widget.py | # -*- coding: utf-8 -*-
# Time : 2021/2/15 16:19
# Author : LiaoKong
from PySide2.QtWidgets import *
from libs import qflat
class RemoveTimedReminderWidget(QDialog):
def __init__(self, remind_by_id, parent=None):
super(RemoveTimedReminderWidget, self).__init__(parent)
self.remind_by_id = re... |
40281b69dfcaa0eb124e84ec10ee183a5bbbf311 | 9e2694b32f9010d1f6b6cfafae8cf254464fe5b0 | /frospy/util/nmfile.py | d2ad9be8c5ded6fe69ab5ec1ee14cf6208479b8e | [] | no_license | sujania/frospy | 32bcb89acbc5ae9a7bef676e546081c56f8cb147 | 3fce33d974d6412717d8ae1d1c27db9160e3930a | refs/heads/main | 2023-02-20T18:03:54.850724 | 2021-01-22T13:36:17 | 2021-01-22T13:36:17 | 331,956,254 | 0 | 0 | null | 2021-01-22T13:36:26 | 2021-01-22T13:36:25 | null | UTF-8 | Python | false | false | 2,566 | py | nmfile.py | from __future__ import absolute_import, print_function
from frospy.util.base import list2stream
import os
def sort_AttribDict(AD, key_type='int', reverse=False):
"""
Sorts an AttribDict with Int or Str keys.
"""
sorted_AD = []
if key_type == 'int':
keys = []
for key in AD:
... |
8156bb7f1bef8f5dc4c6fd8cc6cdbfbf23cd3f5e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02742/s983996581.py | 4b730a301a76877f901f5bc76782bd2005fd55a8 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | s983996581.py | def main(H, W):
if H == 1 or W == 1:
return 1
od = -(-W // 2)
ev = W // 2
ans = (od + ev) * (H // 2)
if H % 2 == 1:
ans += od
return ans
if __name__ == "__main__":
H, W = map(int, input().split())
ans = main(H, W)
print(ans)
|
88c8c62e4493adf991dd74490a23f938722ce1cb | 77a2b3714c8def0fb882f70c02faf8aaa1b9aff4 | /Euler44.py | 06b3c711c8b7201e0c6c550c64d6aa06f86fd917 | [] | no_license | m4wright/Project-Euler | 589393c40091238ddcd52b30b53ef0c9ec8e754f | b27f050c76457cc819d9ea0b7abf13ee156131eb | refs/heads/master | 2021-01-10T07:46:33.222304 | 2016-01-30T19:03:06 | 2016-01-30T19:03:06 | 50,457,409 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 604 | py | Euler44.py | # Program to find the difference between the pair of pentagonal numbers for which
#their sum and difference are pentagonal and is minimised
from Number_Theory import isPentagonal
from time import time
num1 = 0
num2 = 0
i = 0
pent = []
test = True
start = time()
while test:
i += 1
num1 = int((3*i - 1)*i/2)... |
03cc05f8b852068958b756a4e014bc00613cfa75 | 7b2c186b58a54baab6d7e2c21e74e3e11ada9edb | /utils/BsUtils.py | 8e1c5ccd978b13c8b671872a193390e3f7ace65c | [] | no_license | kknet/quant-trading-system | 7d3b1ff24bb8335e3755031220ae61eb5355a75d | 0ec320d41a2c07789ddf984c4a67d52cbd81daba | refs/heads/main | 2023-02-17T03:29:27.549290 | 2021-01-12T14:08:36 | 2021-01-12T14:08:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,848 | py | BsUtils.py | import os
import pandas as pd
import baostock as bs
from pathlib import Path
from utils.FileUtils import FileUtils
from utils.DbUtils import DbUtils
from datetime import date, timedelta
class BsUtils(DbUtils, FileUtils):
def __init__(self):
super().__init__()
self.isSaveToLocal = False
se... |
573c488504d6225901ff04e43d1e699c1e18f8a0 | 4181ae5cb29ea85457070aff76c6b7fcd0708b3c | /chapter_25/pacf_zoom.py | 04be4e7eddd2707e7b1b037dcfde01227cb0aaf0 | [] | no_license | bgbutler/TimeSeriesBook | f2ff2ac820d9becee274ac88da42077d10dd7cae | c44ff4389d2586fb5ca91fd57db8ae3c3b1e425b | refs/heads/master | 2020-06-08T04:20:38.914960 | 2019-06-21T20:41:49 | 2019-06-21T20:41:49 | 193,156,798 | 9 | 1 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | pacf_zoom.py | # PACF plot of time series
from pandas import Series
from matplotlib import pyplot
from statsmodels.graphics.tsaplots import plot_pacf
series = Series.from_csv('daily-minimum-temperatures.csv', header=0)
plot_pacf(series, lags=50)
pyplot.show() |
73e71bda48fed7666a6d946a07afbef7d3f46438 | 0c96ba7de1cea36dd2e2945ad31d6d1c8007dcea | /probe_data_analysis/node.py | 5390ae65e5b79148c9812cfa33e836c132034ddb | [] | no_license | alexisbdr/probe_data_map_matching | d38136ecb610974b8e8a61e61e476aa6a4be60ff | e1ec96523bb00646731cfa4a807805103d70820d | refs/heads/master | 2020-03-24T15:34:20.269171 | 2018-07-29T21:08:52 | 2018-07-29T21:08:52 | 142,794,409 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | node.py | class Node():
latitude=0#A
longitude=0#B
def __init__(self, data):
self.latitude=float(data.split("/")[0])
self.longitude=float(data.split("/")[1])
|
2f6188bfdcf53335793ca5abed3a850cfe8ad943 | 42704268be9dc9c92f0c31d29e4c87ef5452862e | /remove_duplicates.py | 622a1f43f2a0cfb2809e474c1d057f3d33427de7 | [] | no_license | djassal/python | 08af33e061cfbea8785d999ce88a768ae0ac6f1e | 4c902ee3c625dd7d8b486cd7821110e7f6a0d70b | refs/heads/master | 2020-06-25T07:35:27.449249 | 2019-07-28T05:44:50 | 2019-07-28T05:44:50 | 199,247,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 111 | py | remove_duplicates.py | numbers = (10,20,10,20,30,40,60,70)
n = set(numbers)
print("Tuple after removing all duplicates: ", tuple(n)) |
41d12c83600c15fa6f9c0b0c49e35a8a1c63fe7f | 6fef1d3af41050987e090b882ad418bbebe6ae0e | /layers.py | 44357aafb8612aa2b306c3e45cf60495f6710510 | [
"MIT"
] | permissive | hmhyau/rl-intention | 412120d25084494155e5587a6a5fcfdc7aa466fd | 29c84fd9abaa6149fc170531d0ae904fb23047a4 | refs/heads/main | 2023-01-30T13:23:47.427986 | 2020-12-09T16:43:56 | 2020-12-09T16:43:56 | 311,432,519 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,118 | py | layers.py | import torch
import torch.nn as nn
import torch.functional as F
from utils import convert_to_onehot
def mlp():
pass
class Reshape(nn.Module):
def __init__(self, *args):
super(Reshape, self).__init__()
self.shape = args
def forward(self, x):
return x.view(self.shape)
class HNet(n... |
f9d90ad5aac5be888beb5ebeb101fc0d38f56a67 | b564ec162255f3d6bb825a4d2e9b20f5fc14d0a3 | /Steam/Dangan/Patcher/MainForm.py | 67d307aa3205fc4d671643c8b72b483a10946a7e | [] | no_license | wmltogether/Project-Console-Game-Localization | 5eec02064ed99af923b72d8216a025c8ad49a6c2 | 320a5626b202e6ec97862ef719a0292c15bf94ba | refs/heads/master | 2022-06-20T10:25:52.743068 | 2022-05-28T05:06:51 | 2022-05-28T05:06:51 | 52,496,324 | 16 | 19 | null | null | null | null | UTF-8 | Python | false | false | 6,603 | py | MainForm.py | # -*- coding: utf-8 -*-
import System.Drawing
import System.Windows.Forms
from System.Drawing import *
from System.Windows.Forms import *
from System.IO import *
import wad
class MainForm(Form):
def __init__(self):
self.InitializeComponent()
def InitializeComponent(self):
self._buttonPatchFile = ... |
f86af8a1a2108297f95014abd433ab4d34f012aa | 79882157e5745c24a590d577a09d7622c8f4e941 | /DTrees.py | 7721eb1c70be81f4b39880c5aedc59dbc25c8fcc | [] | no_license | cqh6666/data_mining | 9a0e867fba538b29df45c79f0938f96d60c75746 | 49bbbed907fd08e2af2f52f4ee55771d3fcd2da1 | refs/heads/master | 2020-06-13T03:01:12.539719 | 2019-06-30T12:07:18 | 2019-06-30T12:07:18 | 194,511,306 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,958 | py | DTrees.py | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: DTrees
Description :
Author : chen
date: 2019/6/29
-------------------------------------------------
Change Activity:
2019/6/29:
------------------------------------------------... |
bff491c618f533cca5caa437046fa1498865a966 | a3b0fe93a7c7ba5fd548719d04417455e240668f | /A3/test_get_monster_chance.py | 6be879866aa6ebc7d0581fa7a51cdcb1a483e5db | [] | no_license | clintonbf/Small-Python-projects | e9121d421c70b4196cd6e63bed33e3b1f0b0be36 | 3330f82f4690602f21458fe9c3f357745a832c15 | refs/heads/master | 2022-03-25T04:04:08.385181 | 2019-11-25T23:05:00 | 2019-11-25T23:05:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 206 | py | test_get_monster_chance.py | from unittest import TestCase
from A3.constants import get_monster_chance
class TestGet_monster_chance(TestCase):
def test_get_monster_chance(self):
self.assertEqual(4, get_monster_chance())
|
89e4619a993ebaa89c9229dbe32a3a5741eb155e | 32fb6fd06b496b4c9ceabe578dceed265950cc37 | /homework/api/routes.py | 7820e46d569fc5b527d60390856c08d19a1aa7eb | [] | no_license | rach/homework | 8167d3930d4313818e306fb0965ffbd6402bf12b | aca450753445caa188675d637300ead443d15525 | refs/heads/master | 2021-01-10T04:50:53.857108 | 2016-01-11T21:13:38 | 2016-01-11T21:13:38 | 49,445,928 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 150 | py | routes.py |
def includeme(config):
config.add_route('listings', '/listings*traverse',
factory='homework.api.resources.ListingFactory')
|
45486ba1b6b687e37c837d2a5c9c31e42c40edc8 | f14d71046dd5693d2edd3ae728410c186de66244 | /c1/Image Noise.py | f843d62d8ca2a65c9a19a53f83abfd4fd76a8ae3 | [] | no_license | wlyjk12345/opencvtest | 8894616118a6697b34f6c504b5a06afbd56e14a2 | 232f8e0a079f2fd6ac3367fe3c167b731d060a96 | refs/heads/master | 2020-07-17T19:02:34.627574 | 2019-12-03T14:39:22 | 2019-12-03T14:39:22 | 206,078,012 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,885 | py | Image Noise.py | import cv2 as cv
import numpy as np
def add_salt_pepper_noise(image):
h, w = image.shape[:2]
nums = 10000
rows = np.random.randint(0, h, nums, dtype=np.int) # numpy.random.randint(low, high=None, size=None, dtype='l')
cols = np.random.randint(0, w, nums, dtype=np.int) ... |
e2e22f03266dba7665bff4cc20bcf76c0274f100 | 2ed9ebf7b849b253a213e44db868979cf64256d0 | /CodeWars/alphametics-solver.py | fb6b9173c334f520989e76fb8af2c9f484ab3648 | [] | no_license | aleksey-cherenkov/PythonPlayArea | 642fada398e9329ab2b4c6c829edc2743914050f | b341276e683af472dc1d69d023ef5143b72cea9d | refs/heads/master | 2023-09-02T23:34:31.067571 | 2021-11-10T19:25:41 | 2021-11-10T19:46:53 | 175,105,807 | 0 | 0 | null | 2021-11-10T19:46:54 | 2019-03-12T00:36:36 | Python | UTF-8 | Python | false | false | 3,166 | py | alphametics-solver.py | # https://www.codewars.com/kata/5b5fe164b88263ad3d00250b
def perm(p, l):
if l == 0:
yield p
else:
for i in range(10):
if (i not in p):
yield from perm(p + [i], l - 1)
def alphametics(puzzle):
puzzleTrimmed = puzzle.replace(" ", "")
charAddends = puzzleTrimme... |
ea2534fae6e7f964617d6556f890a9042b53e8aa | dc6a4c69f12199ac8f63658fd84d57e63bb06439 | /query.py | 2b4502a9b0d3ac0fcc3c643fb0066fbefc638150 | [] | no_license | bopopescu/PieTwitt | 14017e0f8b6aac163aaecc4a776f419be1113bf3 | 22a582cd4c922e1a3781b614cc4031ec869a44c9 | refs/heads/master | 2022-11-25T02:51:54.439473 | 2015-04-18T20:48:51 | 2015-04-18T20:48:51 | 282,018,405 | 0 | 0 | null | 2020-07-23T17:45:33 | 2020-07-23T17:45:32 | null | UTF-8 | Python | false | false | 1,408 | py | query.py | import datetime
import mysql.connector
# DB credentials
config = {
'user': 'piemaster',
'password': 'piemaster123',
'host': 'piedb.chhtgdmxqekc.us-east-1.rds.amazonaws.com',
'database': 'PieDB',
'raise_on_warnings': True,
}
cnx = mysql.connector.connect(**config)
# ------------------Display all rows from t... |
3cddf2845a5b4a8bb871900ec30d07543e0b4173 | 3b50427f1ca9fc9348114a70ccf8b92a31a12a11 | /python/problem040.py | a379bf1e7b623bc8f701aed45d3c9b06ad54601a | [] | no_license | kordex0/ProjectEuler | 075cec90d0737fd320b49d802290167824fc4deb | 30a4c54ed8ad862ac6c2dd981c6fe521eda95428 | refs/heads/master | 2021-01-14T08:24:04.167730 | 2017-04-27T04:39:07 | 2017-04-27T04:39:07 | 53,451,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py | problem040.py |
# 1000000 < 9*1 + 90*2 + 900*3 + 9000*4 + 90000*5 + 100000*6
def problem040():
ans = 1
s = ""
for i in range(1, 200000):
s += str(i)
for i in range(7):
ans *= int(s[(10**i)-1])
return ans
print(problem040())
|
39f55d07d3c1d52f3d029f3a6796ca540f929cab | ddfd631ca11d5f3439def65b039a183ed943628b | /extract_info.py | d8724f8c4112c424e2ba9ab4099939f6897c0b74 | [] | no_license | yangnaisu/Naisu_Scripts | 1038034b0b068a24738528475fe98116df3f4e65 | 7d1a049e5adff56db59e84a306e15a7d9249315a | refs/heads/master | 2023-02-07T05:38:06.385765 | 2023-02-02T19:18:45 | 2023-02-02T19:18:45 | 162,427,544 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,547 | py | extract_info.py | #coding=utf-8
import sys
input_file_name = sys.argv[1]
output_file_name = sys.argv[2]
# input_file_name = "3-SINERTIP-merged-all.bed"
# output_file_name = "3-SINERTIP-merged-all.bed.out"
REF_column = 3 #
Breed_column = 9 #
flag = "-"
BE = flag
BM = flag
BS = flag
CB = flag
EG = flag
GT = flag
HS = flag
JH = flag
LD... |
d38eca2003c0e52bacb894f68f3bc38a29382d10 | b2d5a389631646d5b4d91b9fdc7803f9917892bc | /oldRepos/MUG14Dev2016/Python/Clase2/lambda.py | 4a73b23510c5e23cd5f8878bfd3b98c0aabb04ad | [] | no_license | Isma115/YouTubeClass | 56e3377037af583a920c7bc68a7097d7b23c3d3d | cab1ab5cfefb720a1804919798045894eb9db015 | refs/heads/master | 2023-06-04T06:53:54.383246 | 2021-06-20T06:45:56 | 2021-06-20T06:45:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | lambda.py |
arr = [1, 2, 3, 4, 5]
l = lambda x: x + 2
print map(l, arr)
print arr
print filter(lambda x: x >= 3, arr)
def get_lambda():
return lambda x: x * 2
print get_lambda()(10)
|
979a8720007f30b3193778147183037111ea73a5 | 2ab7302e0317ff8b0b8100c7c39ed8cb314396a4 | /percentMethyl.py | 7cf57080bac0eaa3d76eb34dc61c7c9be4d15ee3 | [] | no_license | xygen34/bioinformatics | c61797cbc53b6e60f10615dfade144abf0d746e5 | 7c71056fe1447a0fa41b42c9f62695ac08a9e3f2 | refs/heads/main | 2023-08-12T22:04:34.789967 | 2021-10-01T18:46:20 | 2021-10-01T18:46:20 | 399,930,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,602 | py | percentMethyl.py | # Collin Hansen
# States the number of methylated Adenines and Cytosine and find the percentage of each that are methylated
# This assumes the user's input is capital letters for unmethylated and lowercase for methylated
# Methyalted: atgcatgc
# Unmethylated: ATGCATGC
def main():
methylAdenine = 'a'
adenine =... |
48f5e69907f5162752b113f702b715c721996b44 | fc4718c75a259c7878970916f33bc420e82562d0 | /MyProject/test/test.py | 3b2f1260f584c2fcfc1fd9aa9cd802163c200bee | [] | no_license | DzrJob/spider | b2f15405caa93ecf185296a2a4ed8b9b4c5123c3 | cd4b105433a6a83def2bf11c046a3769204cd44e | refs/heads/master | 2020-05-04T00:24:48.535406 | 2019-05-07T14:52:18 | 2019-05-07T14:52:18 | 178,880,953 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,930 | py | test.py | #-*-coding:utf-8-*-
# @File : test.py
{'symbol': 'JMIA', 'amount': 206246934, 'chg': 10.96, 'type': 0, 'percent': 75.59, 'has_follow': False, 'tick_size': 0.01, 'volume': 9452630, 'current': 25.46, 'volume_ratio': None, 'amplitude': 49.65, 'pb': None, 'current_year_percent': 75.59, 'turnover_rate': 12.38, 'float_ma... |