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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a06d63113d3afaa78eef753ac7ce7f5d176bd9a1 | bb3c8e63aa475b72d0a53d8f0ef6e0c06a0271e6 | /ut2/a2/program3.py | e926192623b778c29e4d4b0372e433ef1da885e2 | [] | no_license | poyben/imw | 9020fb3d1138a812215697c135ed3ffa675203a7 | 18c1c8308978a3c03c1446f686ae0a086004ce84 | refs/heads/master | 2022-04-04T22:00:58.429997 | 2020-02-14T10:25:38 | 2020-02-14T10:25:38 | 210,313,711 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 453 | py | program3.py | import sys
import math
nota = float(sys.argv[1])
if nota < 0 or nota > 10:
print('Error. El valor introducido no es un número válido.')
else:
if nota < 5:
print('Suspenso')
elif nota >= 5 and nota < 7:
print('Aprobado')
elif nota >= 7 and nota < 9:
print('Notable... |
09581bc0cd3df9c1e55f433c5242f34b642cf044 | 4d5d867ac2d680dacb5135420adbf2689a47d839 | /test/ntupleproducer_cfg.py | 4a9403dd6c0f2c7e39b4245708eae49feb2b8f58 | [] | no_license | quittnat/ASCore | 10f5023504e585d3c91dacc1a17f7d5eada537f3 | c550fb788cc40b968be4a80feeb033bc1d084dfc | refs/heads/master | 2021-01-17T20:24:06.138002 | 2013-06-20T08:41:53 | 2013-06-20T08:41:53 | 16,069,322 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 38,349 | py | ntupleproducer_cfg.py | import FWCore.ParameterSet.Config as cms
import HLTrigger.HLTfilters.hltHighLevel_cfi as hlt
import FWCore.ParameterSet.VarParsing as VarParsing
process = cms.Process("NTupleProducer")
process.load("SimGeneral.HepPDTESSource.pdt_cfi")
### Message Logger #############################################################
pr... |
426635da8151e0e4437562b518ae6e3e508336f9 | 06f65b3ec0af548ef379059d1f24a237e5625504 | /jogos.py | 55a78671ac75e224f22824bff8d62fcfed3dfdc1 | [] | no_license | Matheus-Nazario/Gamer_Nostalgia_Interactive | c8754af762419faa753364b56cd9a8cfe2fa94f9 | c5fe4653de6ac75e8ab5c8500659d21d30052956 | refs/heads/main | 2023-07-15T18:03:06.021369 | 2021-08-22T21:39:08 | 2021-08-22T21:39:08 | 398,892,578 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 651 | py | jogos.py | import adivinhacao
import forca
def jogar():
apresentacao()
jogo = int(input("Qual é o jogo que você deseja? "))
logica_escolha_jogo(jogo)
def logica_escolha_jogo(jogo):
if jogo == 1:
print("Jogando a Forca")
forca.jogar()
elif jogo == 2:
print("Jogando a Adivinhaçao")
... |
68f071ca13976cc2cb4b9a77319a4b91bb4cc340 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_emancipation.py | 6f2f9ffd6a76d4e01924b652e6028c440b10bcb3 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 361 | py | _emancipation.py |
#calss header
class _EMANCIPATION():
def __init__(self,):
self.name = "EMANCIPATION"
self.definitions = [u'the process of giving people social or political freedom and rights: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'nouns'
def run(self, obj1 ... |
6d5e2bbfd18a13b2d321461f86cdf8dabd59b31c | 1f55f19f666552f9fa3f7c01560859427e102399 | /server/test/prototest.py | 24469e7f68ebc83be4f0d186e7ac4247ad800591 | [] | no_license | grenb/InteSys | 78468da3a508a5f7fef97cf9048e0320ea88f52d | 024092503ed53273bcdbd5d7dc38e6ca763787d5 | refs/heads/master | 2021-01-23T15:15:03.814273 | 2013-08-06T16:51:43 | 2013-08-06T16:51:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 369 | py | prototest.py | # -*- coding: utf-8 -*-
'''
Created on 2013-5-27
@author: GRENB
'''
import google.protobuf
from Protocol import test_pb2
import time
#压缩
test = test_pb2.TestMsg()
test.id=1
test.time=int(time.time())
test.note="asdftest"
print test
test_str = test.SerializeToString()
print test_str
#解压
test1 = test_pb2.TestMsg()
te... |
8fb812ddf083d57d61f9f91a7d8a63c64925a330 | c03de175329c0e3f654341ad184cdd046210b469 | /fonctions_natives.py | ea23b41d8033f948aa6e41dd205ec9580620da8f | [] | no_license | hcloez/python | 5ceea65c3374ace5c95225616c1e05d94272e36a | 78628c49b3507b12f9cf25f6535fe8471941a3a7 | refs/heads/master | 2021-01-24T11:49:38.865186 | 2018-03-02T15:10:56 | 2018-03-02T15:10:56 | 123,106,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 62 | py | fonctions_natives.py | valeur = input("Enter your value")
random.choice([1,2,3,4,5]) |
6e1682782f9703482b0b0a1bb7d141e5277f9476 | 68b20a02c7aa438c65eed5b8095ca566383f2343 | /TL-ERC/bert_model/solver.py | 5432dad2e6cc0286bd3782fa17d4fe17e151dd03 | [
"MIT"
] | permissive | declare-lab/conv-emotion | 68163b8ac523e346715d2b2649a6e97430c30325 | 8851bbde8bedd0fe07beec72d74b3b3624c9c729 | refs/heads/master | 2023-08-23T03:18:47.452652 | 2022-06-29T01:51:41 | 2022-06-29T01:51:41 | 155,637,781 | 791 | 210 | MIT | 2023-06-12T21:32:08 | 2018-10-31T23:54:41 | Python | UTF-8 | Python | false | false | 10,862 | py | solver.py | from itertools import cycle
import numpy as np
import torch
import torch.nn as nn
from torch.nn import functional as F
import models
from util import to_var, time_desc_decorator
import os
from tqdm import tqdm
from math import isnan
import re
import math
import pickle
import gensim
from sklearn.metrics import classific... |
f45417db1ef2dc9b77f3bc8fbf77237df2150aff | c8ec6e3388c2027994d3a589be9cbd21d5da8778 | /RE/RE13/re_01.py | 44876b44d203627e1e654cd3694e08e788ee2883 | [] | no_license | DoStini/FEUP-FPRO | c313dec3a8ed208a960187daf11471aa44c68866 | 37dfed22f34fd515e0f4ed1eb540613de0eeab5b | refs/heads/master | 2021-05-26T08:49:55.305306 | 2020-04-08T11:25:22 | 2020-04-08T11:25:22 | 254,065,132 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 689 | py | re_01.py | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 6 11:41:36 2020
@author: morei
"""
from urllib import request
import string
def longest_word(url):
# Tratamento Web
response = request.urlopen(url)
html = response.read().decode()
print(type(html))
for cmd in string.punctuation.... |
6c96999754fc0acc1f128bac5c0e6558d3ec7c6e | 2b7f28e0cdad34eb8822bbecde6c210094642632 | /arpScan.py | 15872002ed34037e837f00765e4e01981b77f605 | [] | no_license | jackorcherton/PySpy | 6486691b261e8f408978c59703897dd6b540aeab | 4335b2dac70f0fd5c34f60ca254d57331192ad9c | refs/heads/master | 2021-04-10T21:03:13.055453 | 2020-03-21T11:54:10 | 2020-03-21T11:54:10 | 248,965,778 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,494 | py | arpScan.py | #Author: Jack Orcherton
from scapy.all import ARP, Ether, srp
import sqlite3, datetime, socket
def findIP():
"""Finds IP - however will not find real address in VMware NAT mode"""
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
IP=(s.getsockname()[0]... |
6a1edd1bcdab0b770f9a493a5a368835036c0d4c | 70fea1486a160d9b7ea737b5f65cbc693f1460cf | /kebechet/utils.py | 46741a3a17a95bea6ec18ffd5890b78fb23743c3 | [] | no_license | RonnanSouza/kebechet | 4289f9e1e467b35c372eec0ad390b77c28a808fc | 090c36948dcb667fb02c687cdcbefe6194df1da9 | refs/heads/master | 2020-07-27T19:47:29.448820 | 2019-10-06T09:59:41 | 2019-10-06T09:59:41 | 209,199,739 | 1 | 0 | null | 2019-12-03T13:31:07 | 2019-09-18T02:29:44 | Python | UTF-8 | Python | false | false | 2,842 | py | utils.py | #!/usr/bin/env python3
# Kebechet
# Copyright(C) 2018, 2019 Fridolin Pokorny
#
# This program is free software: you can redistribute it and / or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ... |
f727618b8c50d335ee367c6983cb95b27eda4a89 | 50008b3b7fb7e14f793e92f5b27bf302112a3cb4 | /recipes/Python/360649_Remote_Shutdown_on_Windows/recipe-360649.py | 2f7f65bd57e607b0c140c1a75563a9caf2357f22 | [
"Python-2.0",
"MIT"
] | permissive | betty29/code-1 | db56807e19ac9cfe711b41d475a322c168cfdca6 | d097ca0ad6a6aee2180d32dce6a3322621f655fd | refs/heads/master | 2023-03-14T08:15:47.492844 | 2021-02-24T15:39:59 | 2021-02-24T15:39:59 | 341,878,663 | 0 | 0 | MIT | 2021-02-24T15:40:00 | 2021-02-24T11:31:15 | Python | UTF-8 | Python | false | false | 1,969 | py | recipe-360649.py | #!/usr/bin/env python
# win32shutdown.py
import win32api
import win32con
import win32netcon
import win32security
import win32wnet
def shutdown(host=None, user=None, passwrd=None, msg=None, timeout=0, force=1,
reboot=0):
""" Shuts down a remote computer, requires NT-BASED OS. """
# Create an... |
7cedf43dac45f9a6d7dbc9440d51d4b75b47481b | 5955563f05dce9b5de3f5940f78509d2be9a09a0 | /chapter2/test3.py | e7f14f42622aabc25e6ff15fb0dcfe30087ce9bd | [] | no_license | mpenkov/crackingthecodinginterview | 269fc724ba651105fea47d9d08f9405dd6ebbfa8 | fbec31c98d3ae844fc6e7a9dedf9d1c1adf25451 | refs/heads/master | 2021-01-20T11:24:58.458211 | 2015-04-20T07:57:44 | 2015-04-20T07:57:44 | 29,450,743 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | test3.py | import unittest
from sll import SinglyLinkedList
from problem3 import delete_middle
class DeleteMiddleTest(unittest.TestCase):
def setUp(self):
self.sll = SinglyLinkedList("abcde")
def test_last(self):
last = self.sll.head
while last.next_ is not None:
last = last.next_
... |
fb8799a90a863e7142e75b6fe31d9a86680e2eab | 2b8cc628a71ddf9c7cd7e3217381b85279fb5176 | /Exchange/Exhange_Data/Coinbase/Crypto_Price_V2.py | 477c97c51b09287f9c0e1eb9e3867a9a34826e4e | [] | no_license | EL-kds/Cryptonel | 07bf100e61aef670138691879d3c7bea8db81071 | c7f0500899a747f10aebea56ac414dca3e2a874c | refs/heads/main | 2023-08-15T08:15:34.311672 | 2021-10-05T18:56:01 | 2021-10-05T18:56:01 | 413,943,542 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,714 | py | Crypto_Price_V2.py | import requests
import csv
import time
CryptoPairs = {'BTC-USD':'BTC','ETH-USD':'ETH','BNB-USD':'BNB','BUSD-USD':'BUSD','BCH-USD':'BCH','ADA-USD':'ADA','LINK-USD':'LINK', 'ATOM-USD':'ATOM', 'CRO-USD':'CRO',
'DOGE-USD':'DOGE', 'EOS-USD':'EOS', 'FTT-USD':'FTT','IOTA-USD':'MIOTA', 'LTC-USD':'LTC','XMR-USD':'XMR', 'XEM-US... |
73153c0dd9cc7bdd397091c2d1c8122a230a4d1b | c4f083b497e4a928b05dba452bf5a607f76d7d1c | /parser/lib/ElmTypes.py | d07068b24da047b0dd1cca9ac5d3e05a2b54a855 | [] | no_license | showell/elm-py | 291f555ac3d3a08eed388e514f39f12b8fac3aa9 | 76855be7a47c2955b488e507c01276967fa01264 | refs/heads/master | 2020-09-14T00:25:04.103674 | 2019-12-15T11:42:30 | 2019-12-15T11:42:30 | 222,951,987 | 10 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,917 | py | ElmTypes.py | """
This has classes that form an AST for parsed Elm code.
Most classes have a way to stringify themselves, and
objects will stringify any of their children (and so on
down the tree.
Some classes also support an emit() method to emit
Python code.
"""
from Custom import (
CustomType
)
"""
One of the main goa... |
c3937235c13ff4c7895f2c7b4c1d25dfc3cfb5e6 | f878ae9c162b20bb7bdd2ede22d78709ae7b8c61 | /Graph algorithms/Bipartite graph.py | b432571cc4840b0c4d9013f3635b95483923e284 | [] | no_license | mission-learning/Algorithms | f40e6a9997e256f48c6e93915a85c5ca82d56204 | a3e45c7c9b574a800d652aa7e293aaf3ce93bd42 | refs/heads/main | 2023-03-22T06:38:05.412327 | 2021-03-19T21:56:50 | 2021-03-19T21:56:50 | 347,335,128 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,485 | py | Bipartite graph.py | class Vertex():
def __init__(self):
self.visited = False
self.id = 0
self.num = -1
def index(G, u):
borders = []
for i in range(len(G[0])):
if G[u][i] == 1:
borders.append(i)
ret... |
0dba41bc06092b9cd3efef4e6a9406059aeea8e8 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /FWCore/Services/test/test_sitelocalconfig_source_cfg.py | 87a1913d58e24ecad3df5d5e86c2b5b75ba8b421 | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 1,053 | py | test_sitelocalconfig_source_cfg.py | import FWCore.ParameterSet.Config as cms
process = cms.Process("TEST")
process.source = cms.Source("EmptySource")
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
process.tester = cms.EDAnalyzer("SiteLocalConfigServiceTester",
sourceTempDir=cms.untracked.string("/a/b/... |
ed85ffe8ac009965796ece56b0b627c8a4900673 | 45d2ad1ee2046fc237385729a3fc94b3092f7539 | /properties2json.py | 2956db1527e96fd2d1ea6f4df5628036a584ec5b | [
"Apache-2.0"
] | permissive | TsingJyujing/lofka | 586f2b1c482926b8420d361d34cf840e6a5c4462 | 0188e6345f2eb286843c857a5711b49a67b1eb53 | refs/heads/master | 2022-12-09T20:13:18.764868 | 2020-07-05T14:32:38 | 2020-07-05T14:32:38 | 140,853,623 | 75 | 17 | NOASSERTION | 2022-12-08T03:42:30 | 2018-07-13T14:00:13 | JavaScript | UTF-8 | Python | false | false | 907 | py | properties2json.py | #!/usr/bin/python3
import json
from collections import OrderedDict
import sys
from jproperties import Properties
def update_dict(d: dict, ks: list, v):
key_info = ks[0]
if len(ks) == 1:
d[key_info] = v
else:
if key_info not in d:
d[key_info] = {}
update_dict(d[key_inf... |
61b68452f3810d3a277e682742722a0e8ff7968e | 7c8e3fe9941a0f75ff7d2613787f90e95a56f51c | /cases/register/test_register.py | e393eb409f398a359aeab734d9afad8ce5de974f | [] | no_license | fiang-mo/api_test | f2a5f6839310edcae082ff20c1b7fa368bc5b557 | 52d5e40a8b8f4fbf231690bcbd90a4015ee8ff8a | refs/heads/master | 2023-05-25T09:13:31.542727 | 2021-06-01T08:43:43 | 2021-06-01T08:43:43 | 372,239,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,347 | py | test_register.py | import pytest
from api.register import register_user
from common.read_yaml import yaml_to_python
from config.config import ROOT_PATH
import os
# 读 yaml 文件的数据,测试数据和代码分离
register_data = yaml_to_python(os.path.join(ROOT_PATH, "data", "register_data.yml"))
'''
register_data = [
[{"username": "test_register", "passwo... |
1ab4c7b3e307e45e03b543689545121c536bc565 | baeac70879f9e6ace446783d4aec1d09c923e7a1 | /paas-on-oci/installer/OracleWebLogic/samples/1221-domain/container-scripts/deploy_app.py | 19185c23d0bf44f7096ced8b2db2323dd7bf8d8b | [
"MIT",
"UPL-1.0"
] | permissive | rioscesar/terraform-oci-modules | 42695233a2533280864ae94c188668e7bdb146a8 | 143fdc4147e8f94cd35cdad0016fa14e4954afb0 | refs/heads/master | 2021-09-11T01:45:21.690733 | 2018-04-05T23:12:00 | 2018-04-05T23:12:00 | 110,143,530 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 448 | py | deploy_app.py | import re
warPath = '/u01/oracle/HelloWorldWebService.war'
appName = 'mytestapplication'
weblogicUrl = '129.157.177.46:7002'
userName = 'welcome'
password = 'Devops_123'
connect(userName, password, weblogicUrl)
appList = re.findall(appName, ls('/AppDeployments'))
if len(appList) >= 1:
print 'unde... |
6ed04e4625b5cd8dcbd24ced3bac908355243084 | 0a2357ad0098bbb7b74528cb01d6decaab928ed8 | /euler/p12.py | 786fde037662c51d9ccba6f7c851a29b1f165f21 | [] | no_license | touyou/CompetitiveProgramming | 12af9e18f4fe9ce9f08f0a0f2750bcb5d1fc9ce7 | 419f310ccb0f24ff08d3599e5147e5a614071926 | refs/heads/master | 2021-06-18T09:19:01.767323 | 2020-07-16T03:40:08 | 2020-07-16T03:40:08 | 90,118,147 | 0 | 0 | null | 2020-10-13T04:32:19 | 2017-05-03T06:57:58 | C++ | UTF-8 | Python | false | false | 604 | py | p12.py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
isp=range(0,1000000)
p=[]
def init():
for i in range(2, 1000000):
if isp[i]==i:
p.append(i)
for j in range(i*2,1000000,i):
isp[j]=0
def count(n):
res=1
for i in p:
cnt=0
if i>n: break
while... |
af721f1ed7d7c764a047a00746ca90ba68a49352 | 8641773b546fc41a36a78af7e2e1755e37b724c6 | /2022/day4.py | ba88028ec4a9c6b73b833fb6eb8c6e0c04fbaf44 | [] | no_license | RugeljGG/AdventOfCode | 87fe865d748b22ff9456083e84a671896498bb72 | b8367aac0807d123d0921fa6e64404a9d904466e | refs/heads/master | 2023-02-05T19:02:24.008937 | 2023-01-20T18:32:40 | 2023-01-20T18:32:40 | 160,921,509 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 778 | py | day4.py | # -*- coding: utf-8 -*-
"""
Created on Sun Dec 4 05:58:52 2022
@author: gape
"""
from collections import Counter
import pandas as pd
import aoc_helper
data = aoc_helper.get_input(4, year=2022)
print('Day 4 input:')
print(data[:100])
print('Total input length: ', len(data))
print('Total input row length: ', len(data... |
d1b63ccfccf0afb2a9d9dcbb3431701f16b3cd2d | d8cbc94a4207337d709a64447acb9c8fe501c75a | /evaluation/code/models/optimizer.py | dd4cc61926a5038e8e6bed20d9cc342c9403bb2a | [
"MIT"
] | permissive | sripathisridhar/acav100m | 6f672384fa723a637d94accbbe11a9a962f5f87f | 13b438b6ce46d09ba6f79aebb84ad31dfa3a8e6f | refs/heads/master | 2023-09-06T01:05:21.188822 | 2021-11-18T08:08:08 | 2021-11-18T08:08:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,956 | py | optimizer.py | """Optimizer."""
import math
import torch
import utils.lr_policy as lr_policy
def construct_optimizer(model, cfg):
"""
Construct the optimizer.
Args:
model (model): model to perform optimization.
cfg (config): configs of hyper-parameters of the optimizer, including
base learning... |
ec695e0e1178d561283edaa5684f65391a1d51b0 | 360288cfcacad51c559c229d9aac02e325817d97 | /test2_mesh.py | 678b06b713a308496ef294e78b2a579c6725b4fd | [] | no_license | sanjeev309/open3d_demos | 40d02d20081d3ada6f29b9f2d407c472f7f12460 | c64a8cad135c5d5eef866cf7d47d3b486405d9e6 | refs/heads/master | 2021-04-09T11:28:28.077427 | 2018-03-16T18:06:28 | 2018-03-16T18:06:28 | 125,552,007 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,186 | py | test2_mesh.py | import sys
import numpy as np
import py3d
import copy
sys.path.append("../Open3D/build/lib/")
print("Testing mesh in py3d ...")
mesh = py3d.read_triangle_mesh("/home/sanjeev309/Open3D/build/lib/TestData/knot.ply")
print(mesh)
print(np.asarray(mesh.vertices))
print(np.asarray(mesh.triangles))
print("")
print("Try to... |
39a0d3f3d9097faba014da0aa46d1dd2d6175972 | 955a4ddcbb668facc9738c08300f5ae6c181fa5d | /Tarea5_Ply/Analizadores/Sintactico.py | 2fee3af082c3ad94672ceff95771c0766b4181cf | [] | no_license | GersonQuintana/EDD_Tarea5 | 1f17de45d8d89f84380b8a7125b1df0d1b435b69 | bff498d128160e7d434d0f1cdda2d202d151851e | refs/heads/main | 2023-07-26T07:43:37.502682 | 2021-09-10T04:12:50 | 2021-09-10T04:12:50 | 404,892,937 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,880 | py | Sintactico.py | # Sintactico para Fase 2
# from typing import get_origin
from Analizadores.Lexico import tokens
from EstudianteTareas import Estudiante
from EstudianteTareas import Tarea
# Diccionario de nombres
# dictionary of names
names = {}
tipo = ""
lista_estudiantes = []
estudiante = None
lista_tareas = []
tarea = None
def p_... |
b530b32804b9ca09eaf5782c27599c60cb417eba | 10fc6db9c04d6c631faf65db4836b41dca999da8 | /FacturacionElectronica/urls.py | cd5a1756d3a5a231909675b9b7a6f7c9a41d871e | [] | no_license | franksotogithub/FacturacionElectronica | b8273f98d37a0b035365c44b5446d78063e39d89 | afe9f2599f6076782a96829e288168baabfa3afb | refs/heads/master | 2022-12-09T18:37:42.857071 | 2018-11-05T08:00:45 | 2018-11-05T08:00:45 | 137,080,807 | 3 | 5 | null | 2022-12-08T02:55:52 | 2018-06-12T14:07:31 | Python | UTF-8 | Python | false | false | 1,824 | py | urls.py | """FacturacionElectronica URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='hom... |
f7ed6a010be80cd86d7072c32ec0a4cd9b79d254 | 32d2f51cfdbfa8898458df12d44d063ef5da50a0 | /src/short_log_strs.py | 1960a57e1dedb74a6454d6e5f72be579062a6057 | [] | no_license | RedHatQE/rhsm-dbus-qe | ee8b622fde261dd00c5bf4aca72ea28ca4408e4c | 760e9950e32a42935aca4ec9b84a6ddadf95f65d | refs/heads/master | 2020-03-17T09:58:51.688811 | 2018-06-21T09:08:37 | 2018-06-21T09:08:37 | 133,495,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,573 | py | short_log_strs.py | from src.types import (Verification, TestRun, TestSuite)
from functools import singledispatch
from colorama import Fore
def colored_status(status):
return "{0}{1}{2}".format(status and Fore.GREEN or Fore.RED,
status,
Fore.RESET)
def colored_short_status(s... |
4f44a27664cea8d3dad39ebc9c04bc6a97c9ba84 | 55829573f93d6eaa3ea30fe16703085dd1d38605 | /sprites.py | 2dd00727bc809c9aee257f226268e705a15af0cf | [] | no_license | GeekSchool-Alexander/summer-camp-1 | cf788ea34d11960ebcd4bf77229958328a97665f | 242d4497607ff8b2c1b459052fd1724e1ddc2105 | refs/heads/master | 2020-03-19T06:36:19.581537 | 2018-06-14T13:18:36 | 2018-06-14T13:18:36 | 136,037,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,446 | py | sprites.py | import pygame as pg
from VectorClass import Vec2d
from settings import *
class Player(pg.sprite.Sprite):
def __init__(self, game, x, y):
pg.sprite.Sprite.__init__(self)
self.frames = (pg.image.load("./images/ball.png"),
pg.image.load("./images/ball2.png"),
pg.image.load("./images/bal... |
2da5c17d5b543c0d824fd52fde41675bde768ba8 | e21f7d14e564d7fb921277a329ff078e86ad86a2 | /2018/Day 07/day7.py | 2e8e9c8165c93c5a016c1e8dba9520ab2bf4cbf9 | [] | no_license | MrGallo/advent-of-code-solutions | 31456a0718303cca6790cf1227831bcb14649e27 | 28e0331e663443ffa2638188437cc7e46d09f465 | refs/heads/master | 2022-07-07T08:49:30.460166 | 2020-12-17T17:22:24 | 2020-12-17T17:22:24 | 160,988,019 | 0 | 1 | null | 2022-06-21T22:26:19 | 2018-12-08T23:34:51 | Python | UTF-8 | Python | false | false | 2,185 | py | day7.py | from collections import defaultdict
import string
lines = open('input.txt').read().split('\n')
# lines = """Step C must be finished before step A can begin.
# Step C must be finished before step F can begin.
# Step A must be finished before step B can begin.
# Step A must be finished before step D can begin.
# Step B ... |
cf0abd421f2a5d0627c5dc2e30b2ce3198344ee5 | 5c6df448e7181b84ee2a1ace804d5e0eb8be4d3c | /tf_linear_classifier.py | 4cf64c901cdd1cdc10c2d2a344410076b360290a | [] | no_license | Diponly/TensorFlow | 6a3330a415a3e9704a2af435a23b8b3758fe9253 | b9a1ff71ebcf2264111789d5a6c073500bb50682 | refs/heads/master | 2022-10-31T17:52:48.428336 | 2018-03-01T17:13:53 | 2018-03-01T17:13:53 | 123,294,019 | 0 | 1 | null | 2022-10-16T13:15:23 | 2018-02-28T14:10:29 | Python | UTF-8 | Python | false | false | 3,197 | py | tf_linear_classifier.py | import pandas as pd
import tensorflow as tf
import os
from sklearn.model_selection import train_test_split
census = pd.read_csv("census_data.csv")
census.head()
census.info()
'''
age = int64
workclass = non-null object
education = non-null object
education_num = non-null int64
marit... |
1db26ae1f867aadd703c8bb945251c18cebcee22 | 8743cb01e02a5cf45d5e40d59fd04a40e68139b6 | /site_scons/site_tools/PapiTool.py | d09ff8b54be9a97caca0b3483550d4c6c74016f0 | [
"BSD-3-Clause"
] | permissive | SeisSol/SeisSol | a2c9ae29021251db5f811c343762e0699756b39d | 7fde47786f10aebbb4225f4c5125829ea9b541a1 | refs/heads/master | 2023-09-01T08:57:51.863085 | 2023-08-31T07:29:26 | 2023-08-31T07:29:26 | 21,459,883 | 227 | 129 | BSD-3-Clause | 2023-09-13T10:06:09 | 2014-07-03T11:17:47 | C++ | UTF-8 | Python | false | false | 4,541 | py | PapiTool.py | #! /usr/bin/python
##
# @file
# This file is part of SeisSol.
#
# @author Sebastian Rettenberger (rettenbs AT in.tum.de, http://www5.in.tum.de/wiki/index.php/Sebastian_Rettenberger,_M.Sc.)
#
# @section LICENSE
# Copyright (c) 2013, SeisSol Group
# All rights reserved.
#
# Redistribution and use in source and binary fo... |
515ea1c3febcde529f39d9a1885a66fecd2c186e | d7456631b6e9a74f5d9776871ac4c5aeecd50d06 | /test/test1.py | b191c6745cc25a3f2ce0dfddc976213e76d9abb9 | [] | no_license | troubledmuffin/razzle-dazzle | 44f41f046a2b74da746f43be51ff6cca02132233 | e8d230adc9a1b37c390c0fdbd761fbe916d52647 | refs/heads/master | 2018-09-07T17:32:33.846593 | 2018-06-19T09:41:57 | 2018-06-19T09:41:57 | 103,774,396 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 216 | py | test1.py | with open('Ozhegov.txt', encoding='utf-8') as f:
lines = f.readlines()
for line in lines:
vocab = line.split('|')
words = vocab[0]
if len(words) >= 20:
print(words)
|
6019eaaec1be8d318bc8a1bb967b651037cf1bdb | 0bedf593a0e02c3b1a81376996ec663eba4b79d2 | /optimizacion.py | 6dc5bf2b0f66f4c6ac4d3267288e14ad4448347f | [] | no_license | CristhianCastillo/oop-with-python | da91c3eb720067c4028e5fb075ddd4e82f65c451 | 32d3e53705036773c425f55bbcd7776679f09cfa | refs/heads/main | 2023-02-05T13:48:48.127696 | 2020-12-27T01:14:35 | 2020-12-27T01:14:35 | 324,038,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 640 | py | optimizacion.py | def bag(size, weights, values, n):
if n == 0 or size == 0:
return 0
if weights[n - 1] > size:
return bag(size, weights, values, n - 1)
result_1 = values[n - 1] + bag(size - weights[n - 1], weights, values, n - 1)
result_2 = bag(size, weights, values, n - 1)
print(f'Tomar el va... |
1651fa8a94c82f53f6b26d93ba773ec25f6da44a | e0de2effeacff6dbce90ba1efa35fea0d18f14fe | /adhoc/aneduarte/1961.py | 4de8af7797ca46efa968c1e8fed80b801562250f | [] | no_license | thyagomaia/projetocpu20211 | 12a14c84790f2cb74519a209e61752e3e3df6301 | 391197ba4a37b93306438c04ca486b5b8c1b41e6 | refs/heads/main | 2023-03-31T09:38:16.998793 | 2021-04-05T13:39:31 | 2021-04-05T13:39:31 | 354,829,503 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 344 | py | 1961.py | # -*- coding: utf-8 -*-
dados = input().split(" ")
P = int(dados[0])
N = int(dados[1])
pulos = input().split(" ")
pulo = int(pulos[0])
for i in range(1, N, 1):
pulo_seguinte = int(pulos[i])
if (abs(pulo-pulo_seguinte) > P):
print("GAME OVER")
break
pulo = pulo_seguinte
if (i == N-1):
... |
b2517904012b917ad609c693e1601ca677af8f0b | 6a92c1623a4940293103cce60da806a78012bee3 | /leagues/forms.py | d2f0d888e395da7c9647c01d4b0e72fdd3ac6924 | [
"MIT"
] | permissive | maven8919/football-ech | a336cc5ce0f27235e0ac82dc030a7b009023db9b | 61f9b8e2f2468ec7d849b68802a1ce009277275d | refs/heads/master | 2021-01-10T07:19:35.951151 | 2016-09-12T14:31:51 | 2016-09-12T14:31:51 | 51,950,364 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,196 | py | forms.py | from django import forms
class LeagueForm(forms.Form):
league_name = forms.CharField(label = "Group name", max_length = 30)
max_size = forms.IntegerField(label = "Maximum participants", min_value = 0, max_value = 9999)
points_for_exact_guess = forms.IntegerField(label = "Points for exact guess", min_value ... |
984f7b40d8db3230e1c3d180e5522fdc0faaa652 | 8dd80c0ab4d1c34181cf3a8fe8e0d5e54b0d10b7 | /test.py | 0a602b0896e8b1c267bbca1c94046ef898cebf22 | [] | no_license | bhhoyer/DRAWSTest | 872b38f1d0ab445f631157924a312cd9b8b2dec4 | 6a4914cffc6aa00344fd7c07c9537a3ff1915079 | refs/heads/master | 2020-04-29T12:22:36.380868 | 2019-03-21T17:42:11 | 2019-03-21T17:42:11 | 176,134,664 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,476 | py | test.py | #!/usr/bin/env python
import subprocess
import time
import sys
import re
revision = 0.1 #unreleased
print
print "NWDR DRAWS Test Program REV",revision
image = subprocess.check_output(["head","-n 1","/var/log/udr_install.log"])
print image[25:]
error = "Error Report:\n"
print "*** Checking EEPROM"
hat = subprocess.... |
be9bcbb1af390b81c24c152935d8b7ecc097d41d | 5a9cb1ac8fd8e40bd84f679a838512034fe94b69 | /plotting.py | 9e3edc46b196bbbb1c282e979f6e1149c67dbfb3 | [] | no_license | Michael-Krohn/HGCAL_Testbeam | 40b1c55a3a75c3b6d568de662fa4fa1bbd33f975 | 20f62df7a6d4c52e3d866a3930445734f7be0cdb | refs/heads/master | 2021-04-23T21:31:49.249134 | 2020-05-20T21:01:32 | 2020-05-20T21:01:32 | 250,010,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,829 | py | plotting.py | import ROOT as r
import sys
import datetime
import subprocess
import os
import copy
# import sets
import collections
import math
import CMS_lumi, tdrstyle
import array
import numpy as np
############# data Arrays ##############
#Breakdown Voltages of both SIPMS used
Breakdown_s13360 = 51.76
Breakdown_s14160 = 38.31
... |
022097faef8e7209776525ee475c0512428bb2a7 | d9c8a6f62460b0fbed3b00d2aff84a845e610a98 | /practice_charts/7-seaborn_plot.py | dc091e7d3972604be75dbab1c3f7b4afa51b4c4c | [
"MIT"
] | permissive | ferdinandwp/myPython | 818bb5132594dcfa0185d1d2b81a80622ad7faeb | 46a5b41b1914b3bfab2d18e72cc866acb3842119 | refs/heads/master | 2020-05-18T07:15:57.454234 | 2019-06-24T16:02:32 | 2019-06-24T16:02:32 | 184,259,546 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 495 | py | 7-seaborn_plot.py | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
import seaborn as sns
df = pd.read_csv('data/iris.data',sep=',',header=None)
df.columns = ['sep_len', 'sep_wid', 'pet_len', 'pet_wid','class']
plt.style.use("ggplot")
sns.set()
#sort df
sorted_df = df.sort_values('sep_len')
sns.linepl... |
fc16ca168be89a83ae0bc2afeefa7f34513389d4 | 0dd3258d8c04a59d937529b49c8c64f054a23a60 | /data/add_ercc.py | fd63494aae1bbc9e7257461d5d6ed267686781e3 | [] | no_license | knguyen4221/ruvseq-ag | 5f63b1c18073884c8d3770434377eada3857d5ec | 4c1b0e9fee27db6b357507169f89997fe7a2ae05 | refs/heads/master | 2021-09-04T06:53:01.085101 | 2018-01-11T20:36:17 | 2018-01-11T20:36:17 | 114,688,331 | 0 | 0 | null | 2018-01-11T20:36:18 | 2017-12-18T21:14:19 | R | UTF-8 | Python | false | false | 591 | py | add_ercc.py | import os
import re
def add_ercc(data, spikes):
infile = open(data, 'r')
lines = infile.readlines()
infile.close()
spikeins = open(spikes, 'r')
for line in range(len(lines)):
if lines[line].startswith(','):
ercc=spikeins.readline().strip()
pattern = re.compile(r'.*gene_id "(.*)".*transcript_id "(.*)"')
... |
2485e47892724beada312cfefdb670f8f26c1e84 | cc13e5e7f80d546170b0aa2abc63f83db45d7623 | /Vehicle Range Simulations.py | c2c5135fc64e95ffb2c93446259475e30e180de3 | [
"MIT"
] | permissive | hornbartho/Vehicle-Simulation | 3336e4b82c1d665433c10cbf29dc184150f7d166 | 41f288593935c13e08746bdeef91af4339953e09 | refs/heads/master | 2021-06-26T11:11:59.517857 | 2021-02-05T07:55:02 | 2021-02-05T07:55:02 | 205,794,597 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 7,544 | py | Vehicle Range Simulations.py | ############################### Imports #######################################
import numpy as np
import scipy as sci
from matplotlib import pyplot as plt
from math import pi,degrees,sin,cos,sqrt,asin
############################ Kown Parameters ##################################
g = 9.81 ... |
990c601737d4dd68770da529d4714b915c473a3e | dfa1a1a263eab3ac8bbcb2a00297da7fc82bccfd | /src/depth-first-searches/longest-increasing-path-in-matrix-329.py | a625bb5a85b179f2f8bac38c214ff7b9170a66e1 | [] | no_license | monpro/algorithm | 07e79e7a85ca9fe86fac0b3c740de2f2037f5e89 | a330e92191642e2965939a06b050ca84d4ed11a6 | refs/heads/master | 2021-07-01T03:49:59.040611 | 2020-08-25T12:36:54 | 2020-08-25T12:36:54 | 143,118,129 | 102 | 0 | null | 2020-05-31T04:22:46 | 2018-08-01T07:12:45 | Python | UTF-8 | Python | false | false | 1,287 | py | longest-increasing-path-in-matrix-329.py | class Solution(object):
def longestIncreasingPath(self, matrix):
"""
:type matrix: List[List[int]]
:rtype: int
"""
if len(matrix) == 0 or len(matrix[0]) == 0:
return 0
row_length, col_length = len(matrix), len(matrix[0])
cache = [[0 for i in range(co... |
dd007ac3bdd142d5132acbe3f2e76e50ea832d3c | a0d8bb4d053ed70549bda4be465880df769cbb7b | /YouSayYouWantAConvolution/python/convlib/convlib.py | b8e1dd59ad2414ab495ba697ee975ce34f2ca870 | [] | no_license | Thuney/Homegrown-Convolution-Lib | 017633dc479e3e00c68408544cbd18c9a518e1e3 | ca0f55a571777a1a623d985aca13c6c7b5b68572 | refs/heads/master | 2023-06-03T13:52:23.554372 | 2021-06-18T18:11:35 | 2021-06-18T18:11:35 | 324,512,325 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,768 | py | convlib.py | import threading
from ctypes import *
so_file = "../cpp/build/lib/convlib.so"
c_conv = CDLL(so_file)
def c_convolve_brute(f, g):
f_len = len(f)
g_len = len(g)
num_convolved_samples = (f_len + g_len - 1)
c_arr_f = (c_double * f_len)(*f)
c_arr_g = (c_double * g_len)(*g)
c_arr_convolved = (c... |
f60a992e090dc068c7bb9e30059d38fb53f1e5bd | 2718b6f68a717b24cd6238a20d4116b3dea3201b | /TextBlog/mysite/read_statistics/utils.py | dfa4279837e94e14f388fd944022466bc492f2ea | [] | no_license | tminlun/BlogTemplate | e94654e01e170f27c97c197c898c102518ad13ab | d475587fdd9e111961bbfa56666255d38cfdc056 | refs/heads/master | 2022-12-11T00:51:53.019391 | 2018-12-05T14:54:04 | 2018-12-05T14:54:04 | 138,825,320 | 0 | 0 | null | 2022-12-08T02:25:29 | 2018-06-27T03:30:20 | Python | UTF-8 | Python | false | false | 2,324 | py | utils.py | import datetime
from django.contrib.contenttypes.models import ContentType
from django.utils import timezone
from django.db.models import Sum
from .models import ReadNum,ReadNumDate
from myblog.models import Blog
#create your readnum
#������
def read_statistics_once_read(request, obj):
ct = ContentType.objects.g... |
0b41ee925f513e31b98193e19a8dbff1bd8b4095 | 4a9f3fef5a539eba0129baca9f0b12096c6a6ac6 | /song/tests.py | c1b6b70e3d6d0dc2900f0c947c99da0cc6b047f1 | [] | no_license | Z3TEL/song_me | acc8e0f46a374828e659d4f5832d6ca5cf3fa751 | 60a4f1fafc978ffefdfd6a4c638616e2e29dbac0 | refs/heads/master | 2023-08-15T02:14:40.242834 | 2021-09-17T11:05:35 | 2021-09-17T11:05:35 | 403,721,071 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,579 | py | tests.py | from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from rest_framework.authtoken.models import Token
from rest_framework.test import APIClient, APITestCase
from .models import *
User = get_user_model()
class TestAuthor(TestCase):
def setUp(self)-> None... |
e751522429be22b6954694071b06e17686a291eb | 14b5679d88afa782dc5d6b35878ab043089a060a | /students/zhouyutao/work_0603/井字棋.py | d237df80482df9d5608aa14f2c9b2904303dd85c | [] | no_license | mutiangua/EIS2020 | c541ef32623f67f9277945cd39cff3c02f06e4dd | 92aa2711b763a2c93be238825c445bf2db8da391 | refs/heads/master | 2022-11-18T05:21:47.567342 | 2020-07-11T10:11:21 | 2020-07-11T10:11:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,646 | py | 井字棋.py | import cv2
import numpy as np
import time
import wave2pinyin as w2p
import recordsound as rs
from xpinyin import Pinyin
p=Pinyin()
order=""
def click(event,x,y,flags,param):
global turn
x=int(x/120)
y=int(y/120)
if 1<=x<=3 and 1<=y<=3:
if event==cv2.EVENT_LBUTTONDOWN:
... |
b60c585fe6a442ca8ff03df464678b7b09fda720 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_199/3855.py | dd1497a7d2d0a722db3c5fcee49fc816f0b71ac5 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 785 | py | 3855.py |
def logic(inp):
counter = 0
parts = inp.split(" ")
pancakes = list(parts[0])
ksize = int(parts[1])
for i in range(len(pancakes) - ksize + 1):
if pancakes[i] == "-":
#flip k
counter += 1
for j in range(ksize):
if (pancakes[i+j] == "-"):
... |
a3fdad2c0c0bb19a96a69a011f88bf772e9d1e48 | 0bd8e5421b9ae8e0cde41355063c3f2164a518c8 | /rpasm27.txt | 199d498987af0556c5057f668b1a888dd2c216cd | [] | no_license | eric712/aug2020 | 741e93006795d55079fdd009d49837f18d363cbc | 8814f76dd0599cf48da23a0bcec6c31f0206fb03 | refs/heads/master | 2022-12-01T08:05:37.936855 | 2020-08-17T22:28:28 | 2020-08-17T22:28:28 | 288,294,430 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 211,642 | txt | rpasm27.txt | #!/usr/bin/python2.7
# Attempting to allow use of Python3.X hard Python
# filename is rpasm27.txt and is in Python 2.7 or 3.4
# 2120 rj1760 is still broken
# stuck at line 3957 > 255
# stuck at line 1261 or rrd1370 is BROKEN
# attempting to translate casm5.c into pasm27.py
def mids(strids,plonepos,midsw):
plzerpos=pl... |
6ce94cdcbd92f3e26110e6ed3a0321a0f3960c57 | d5f333bfd0c556480c23e925aabe88d43a972a7d | /setup.py | 5f9a098ce552251c2571b0a8570c517790fd7eae | [] | no_license | jedgalbraith/mysql_quick_clone_py | 83a66ec5d7139154509e6867ad38c913d9055231 | 97017f96385260473b97c88fff70b2b397236908 | refs/heads/master | 2016-09-05T19:08:43.597477 | 2012-11-28T18:39:04 | 2012-11-28T18:39:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | setup.py | # from distutils.core import setup
# setup(
from setuptools import setup, find_packages
setup(
name='quick_clone',
version='0.0.1',
packages=[
'quick_clone',
# find_packages(),
],
scripts=[
'bin/quick_clone'
],
author='Jed Galbraith',
author_email='jed@delorum.com... |
056fdd2a2601bcad2887bc84e61a32095b90d52e | fd528ceb476da05554ae054de5bc801b9a616ab2 | /app.py | a98a367b3cca16bb1bbcf3543ba83b6c39a282d1 | [] | no_license | Otaku-99/Blog-system | 4d920adfc7d6c1ff3a158e980ca5c098ee9f0550 | 13b45b2a7719c17f486f8bfd10a6a3830936c018 | refs/heads/master | 2023-03-09T09:26:36.252518 | 2021-02-21T05:59:59 | 2021-02-21T05:59:59 | 340,829,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,604 | py | app.py | from flask import Flask , render_template,url_for,request,redirect
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///posts.db'
db = SQLAlchemy(app) # To initialize database
class BlogPost(db.Model):
id = db.Column(db.Inte... |
8468527e35e6f92f7c12026f8e5bda2a69f4556d | 23a89b5304fbcc5039994554b4c7ee9be0ffe3ba | /SquamataBase/Glossary/forms.py | 5d329eccd26aebdcf99c6b1f47387ad76b405223 | [] | no_license | SquamataBase/SquamataBase | 753f721a6184b68121512f20f48547381b07ed40 | 3b94fae823674f4fecc9d614bd1d4278166baf1f | refs/heads/master | 2021-01-12T17:53:31.842991 | 2020-04-22T13:57:20 | 2020-04-22T13:57:20 | 71,288,566 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 726 | py | forms.py | from django import forms
from dal import autocomplete
from .models import *
class OntologyTermForm(forms.ModelForm):
class Meta:
model = OntologyTerm
fields = ('__all__')
widgets = {
'collection': autocomplete.ModelSelect2(
url = 'ontology-coll... |
16ba68271089769b1191370ac283d3160f18c5fd | 96f13f8539bc25773f4ee54f15c9669f1cb5e0eb | /pessoas/serializers.py | 908c981ea8fa70b382847dc1e994416151ad556c | [] | no_license | JBragaV/estudo_django_api_rest | e5bf694ad1f927d1ef34ba4685403e0bc31a416d | 68336fa6a0de638160a1d18ce4ffe25feb5aa898 | refs/heads/master | 2023-04-13T18:41:53.986514 | 2021-05-05T02:00:36 | 2021-05-05T02:00:36 | 356,951,360 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 206 | py | serializers.py | from rest_framework import serializers
from .models import Pessoas
class PessoasSerializers(serializers.ModelSerializer):
class Meta:
model = Pessoas
fields = ['id', 'nome', 'cidade']
|
260b843f87ba21d170d28266818231889a5efa66 | 486521077f14b8411895ca13f10ad003b9676b35 | /faadata/airports/admin.py | 933197da3dbca6f6c237fc2aabf2311b73f4671f | [
"BSD-3-Clause"
] | permissive | adamfast/faadata | bf413fc2e49879d14227f559e7f0528cfce46bd4 | 69f9ee542b6c3f6ad0d8be6e009220f4c08eae64 | refs/heads/master | 2023-08-24T17:05:24.047472 | 2023-08-13T21:57:09 | 2023-08-13T21:57:09 | 860,204 | 5 | 6 | null | null | null | null | UTF-8 | Python | false | false | 900 | py | admin.py | from django.contrib.gis import admin
from faadata.airports.models import *
@admin.register(Airport)
class AirportAdmin(admin.OSMGeoAdmin):
#class AirportAdmin(admin.ModelAdmin):
list_display = ('location_identifier', 'facility_name', 'elevation_msl', 'status')
list_filter = ('facility_type', 'control_tower')
... |
aa8626c08545ea3b3ee9f11f91eec6b02679e035 | c39b25386b6aea661767a5f3ebc5512d0f4d45b7 | /catalog/application.py | d2e7fd1154d60ab6da5f9bd8e8ba4d5bbee69d13 | [] | no_license | agratson15/item-catalog_1 | faae43ec98fd7e75ff6ac5c1993c3613d10437a6 | f41bb9c59ac730bf1acb07156fa6789dd6f3991a | refs/heads/master | 2018-01-08T12:13:18.477557 | 2015-05-26T16:31:49 | 2015-05-26T16:31:49 | 36,309,102 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,975 | py | application.py | from flask import Flask, render_template, request, redirect, jsonify, url_for, flash
app = Flask(__name__)
from sqlalchemy import create_engine, asc
from sqlalchemy.orm import sessionmaker
from database_setup import Base, Category, CatalogItem, User
#New imports for this step
from flask import session as logi... |
77f29743f3d9b2504d6a46ff5fc9b22e8793cea1 | ddfee1162bc0ac57eebb89cd70b8e814670167d6 | /app/controllers/img.py | 7f0fa5de38edfb75dbbe2f4f0eebdaa83f560e1b | [] | no_license | elementalife/img | 1d952c5c0e9467e9e937eb3757415190c3b6d0b5 | 5eb33c757f8bfd869bc864d8a9dee80af35509dd | refs/heads/master | 2021-01-13T01:22:31.601426 | 2012-03-15T04:05:41 | 2012-03-15T04:05:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,210 | py | img.py | #!/usr/bin/env python
# coding: utf-8
import web
from config import settings
from datetime import datetime
from store import Store
render = settings.render
config = settings.config
class UploadView:
def GET(self):
return render.upload("Upload")#todos
class Gallery:
def GET(self):
return ren... |
9e5c584614f7fcd58afc905ff6a76fc109b6a372 | f4ac854bd4b9fb937c932f91fa699d7119c57154 | /PythonRozszerzony/Lista4/Zad1.py | 70a208e4b630e9b91d720f5f895365b41f5cd75b | [] | no_license | dawidovsky/IIUWr | 936059533707561b1100804a898ab4d5ffa6a6c8 | 73f0f65fb141f82a05dac2573f39f6fa48a81409 | refs/heads/master | 2021-06-01T11:29:11.574259 | 2020-10-09T09:59:32 | 2020-10-09T09:59:32 | 126,064,899 | 9 | 4 | null | null | null | null | UTF-8 | Python | false | false | 934 | py | Zad1.py | import math
import timeit
def czy_pierwsza(n):
for i in range(2, math.floor(math.sqrt(n)) + 1):
if n%i == 0:
return False
return True
def pierwsze_imperatywna(n):
res = []
for i in range(2, n+1):
is_prime = True
for j in range(2, i):
if i%j == 0:
is_prime = False
if is_prime:
... |
624c838525821b03210d173e6de79bd893eb286d | 2f0a9a61d967cf4d6bc008778dcc352a5a540604 | /trade.py | 96be90518a2b34ccd737c81c16d2dbc129b834ab | [
"Apache-2.0"
] | permissive | sumforest/first_python | 1f1361d9931d117f7f2ba2014a20f9c501a25ea2 | 93d6349bc9741c84174ff4982b04099beab72971 | refs/heads/main | 2023-05-31T09:38:09.543740 | 2021-06-13T14:09:08 | 2021-06-13T14:09:08 | 376,556,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 136 | py | trade.py | money = 99
count = 5
person = '小明'
print(money)
print(count)
print(person)
money = 9.9
print(money)
money = '9.9元'
print(money) |
b970f8adaed511407474603196135ede594fdb15 | ebdf9245b3aef37e0d0cec7674ba6f7a6d7c1fd5 | /threema_mm/threema/lookup.py | 62397f2a2fc1f9a4628aebc59984d4e821cab91c | [
"BSD-2-Clause-Views"
] | permissive | rugk/threema-mattermost | 0332ce6ced6c0c72dea07e9f876dcf60ce15822b | e2162e83e6bf7b26c2fe72e814c798c9f2363a4c | refs/heads/master | 2021-01-13T21:33:45.490298 | 2016-01-07T10:45:28 | 2016-01-07T10:45:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | lookup.py | import asyncio
from threema.gateway import Connection, GatewayError, Key
@asyncio.coroutine
def getpub(threema_id, threema_api_secret, requested_id):
connection = Connection(threema_id, threema_api_secret)
try:
with connection:
key = (yield from connection.get_public_key(requested_id))
... |
b418e0c4e63a3db09e0ec3c6d1b4dc8d79dbc51c | 6da941d4357dab9f664a6763ffc662d85f333ab5 | /src/train.py | 133496c6cddb488c8d17921021aac65851277693 | [
"MIT"
] | permissive | herbiebradley/Fast-Neural-Style | 3b77def6ad5e7e96caf6c2f8500f6b1ff4f57d39 | 18b881a3c9eb3a45bb71a8ebbf3581b223c259c0 | refs/heads/master | 2021-11-11T11:36:24.672517 | 2021-09-09T10:31:30 | 2021-09-09T10:31:30 | 172,775,372 | 3 | 0 | MIT | 2021-09-09T10:31:31 | 2019-02-26T19:24:24 | Python | UTF-8 | Python | false | false | 3,647 | py | train.py | import os, time
import numpy as np
from PIL import Image
import torch
from torch.optim import Adam
from torch.utils.data import DataLoader
from torchvision import datasets, transforms
from options import Options
from networks import Generator, Vgg16
"""
Required args: --cuda, --data_dir, --save_model_dir, --style_ima... |
dea57f04a5e3e632d8b2395d25e0f33982c45f1d | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_162/ch77_2020_04_12_22_10_21_394459.py | acface773a18969aedc083112810c44e6330239b | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 164 | py | ch77_2020_04_12_22_10_21_394459.py | def calcula_tempo(nada):
dic = {}
for atleta, aceleracao in nada.items():
tempof = (200/aceleracao)**0.5
dic[atleta] = tempof
return dic |
4e9c7c67fd279210c386cce9412f07e60c66b6f4 | 81bd6e484106ececefe9c51c6b3ad894d445a92d | /dammit.py | 9bb78aeae1828d9d0ddc762967e162885409eaf4 | [] | no_license | blasks/MMETSP | 5eea5e925b764b91363fdaf50de0e3d112116b40 | 32a7438f52576f9b563d3af44fe8ea456ccb1629 | refs/heads/master | 2021-05-26T20:34:16.534152 | 2016-09-10T21:31:07 | 2016-09-10T21:31:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,423 | py | dammit.py | import os
import os.path
from os.path import basename
from urllib import urlopen
from urlparse import urlparse
import subprocess
from subprocess import Popen, PIPE
import urllib
import shutil
import glob
# custom Lisa module
import clusterfunc
def get_data(thefile):
count=0
url_data={}
with open(thefile,"... |
f5c8e4c8edd3f52c59bc606288bfed073e99edb4 | 36afa271f080459adf1014cd23f4be9f954dfee6 | /Example/math/质数(素数)判断.py | 4d475321af11318d151d21500115dc3a576ec75a | [] | no_license | King-Of-Game/Python | b69186a7574ce1c0b7097207cfe9a2eb38a90bc0 | 643b9fd22efd78f6679735f23432943a57b5f5bb | refs/heads/master | 2023-05-25T05:35:14.473114 | 2021-10-24T12:52:21 | 2021-10-24T12:52:21 | 151,251,434 | 3 | 0 | null | 2023-05-01T20:51:50 | 2018-10-02T12:34:04 | HTML | UTF-8 | Python | false | false | 818 | py | 质数(素数)判断.py | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# __author__ : YiXuan
# __date__ : 1/15/2021 8:44 PM
# __software__ : PyCharm
'''
质数要满足两个条件
1. 大于 1 的自然数
2. 只能被 1 和它本身整除
'''
# number 是否为质数
def is_primeNumber(number):
for i in range(2, number):
if number % i == 0:
print(f'{number} 不是质数:{number}... |
349b43025fb990853ff6c202d26526b7f33d1261 | 34a9c56ea3b9eae9201cb43bb3a00f592e4a6300 | /week1_00_packages/package_project/subpackage_1/__main__.py | bcb7875204cd3b28bf07f2b58a9b62bd87355920 | [
"MIT"
] | permissive | SaidMuratbekov/msai-python | 1bd95e72fd24239be15f1ecaeab1ee5cd8889acc | fc694d9d6571af8dbdf162a35f98b6ffdd079396 | refs/heads/master | 2023-05-09T17:58:32.213154 | 2021-06-17T18:13:24 | 2021-06-17T18:13:24 | 377,278,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 115 | py | __main__.py | # subpackage_1/__main__.py
from .module_1 import module_func
print(f"Result for module func is: {module_func()}")
|
c585018a0a01c30c97eeabe999bc03a4ed35cccd | 45aef2c13221ce4ec0fd4e982bbf71a4d7262c0f | /485-最大连续1的个数.py | 05700a152a333da05d74f4dee80e48bf2b8edf56 | [] | no_license | lidianxiang/leetcode_in_python | c421d3db511f74a6e26643875ed0cbe05c66c389 | 43ca92094e87f70065f8755d3909a9158e4b91e5 | refs/heads/master | 2021-11-27T15:11:10.162147 | 2021-11-23T02:45:48 | 2021-11-23T02:45:48 | 224,069,915 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 807 | py | 485-最大连续1的个数.py | """
给定一个二进制数组, 计算其中最大连续1的个数。
示例 1:
输入: [1,1,0,1,1,1]
输出: 3
解释: 开头的两位和最后的三位都是连续1,所以最大连续1的个数是 3.
"""
class Solution:
"""
用一个计数器count记录1的数量,另一个计数器maxCount记录当前最大的1的个数
"""
def findMaxConsecutiveOnes(self, nums):
count = max_count = 0
for num in nums:
# 当数字为1时,count加一
... |
1dc92922de4a9e32e8bf4d81ea8e0b52bde10b29 | 8160f8290bf2dcf8d9a01811ca2c25377bfc373a | /emolog_pc/emolog/dwarf/dwarf.py | 0eb467be59536167e6bb3157715cedd383243673 | [
"MIT"
] | permissive | alon/emolog | 92cb1a4107b5239dea7ae4d83cbc479b176179e3 | 335278add709544cdbd8e8691db2a2e16e1eaf6d | refs/heads/master | 2023-08-03T10:32:11.677532 | 2023-07-20T01:42:04 | 2023-07-20T01:42:04 | 56,530,754 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 22,339 | py | dwarf.py | #!/usr/bin/env python3
"""
DWARF parser minimal implementation.
All references unless states otherwise are for:
DWARF v3, December 20, 2005
"""
"""
Enumeration examples
TI ARM C/C++ Codegen PC v16.9.6.LTS
([], DIE DW_TAG_enumeration_type, size=13, has_children=True
|DW_AT_sibling : AttributeValue(nam... |
d3164ea5680c9982310c41c7545865e4e53f5671 | fb3f9658c30ce1fbd7db38679db4ef03d98fc10d | /landchina/landchina/pipelines.py | 6e7653bae3e173f4a938f397138ac56b961ddd2a | [] | no_license | HyperionTau/landchina_spider | 53df55ffd7440a235c50831d4a5a7b92c5f256e9 | 001ff12fb7a0ada79c7337c9958dab0688d64bc8 | refs/heads/master | 2020-03-16T01:57:59.959455 | 2018-02-07T06:34:56 | 2018-02-07T06:34:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,940 | py | pipelines.py | # coding=utf-8
import csv
import xlwt
# 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
class LandchinaPipeline(object):
def __init__(self):
self.myexcel = xlwt.Workbook()
self.info = self.myexc... |
0f7b8302c3074fdeb7dce7f3b0c04750586d7039 | c5a9a869d01ae2bb8710d8c2eaff6f440f21af96 | /Server/server/face/face_process.py | e07614df1cc74a8154522dd3a24f07a292007760 | [] | no_license | TXLuong/__DATN_All | 422ddae7d9939c10ce453853866ca8c56c30af9f | cfbe3470bcea6b558c83e23f7284b283da0b9144 | refs/heads/master | 2023-05-31T02:32:27.389912 | 2021-06-18T14:10:39 | 2021-06-18T14:10:39 | 378,170,154 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,124 | py | face_process.py | import sys
import os
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
path_cur=os.path.dirname(os.path.abspath(__file__))
import torch
import numpy as np
from PIL import Image
import cv2
import math
import time
from torchvision import transforms
from backbones.iresnet import iresnet100
from alignment.... |
467ab2fd9d3e3e4b671e7a2a590417beb2e174dd | a4e9a8c5f7f8bd5a02e0ba94d137ba3749e6e203 | /tserie/scripts/plot.py | 5e08f479c822591deca918e3a4e413f5d13d195d | [] | no_license | aberger91/tserie | c29546ebd458f567da39cb48c83575729ee140fb | f0f3db17785369b1a4e9861bf05be9a9f7465638 | refs/heads/master | 2021-06-14T01:59:02.278298 | 2017-04-12T19:35:50 | 2017-04-12T19:35:50 | 83,098,076 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | plot.py | from tserie import Batch
import argparse
def main():
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser()
parser.add_argument('--instruments', '-i', type=str, required=True)
parser.add_argument('--start', '-s', type=str, required=True)
parser.add_argument('--end', '-e', type=str, requ... |
67164f7f20f6e8c036c85733fc0c8383431ef3e1 | 68d0e13f2c06a7e391417f085eb692d9b3a4d75e | /clientAES.py | 1db65545f4ce1a74055cf4b6365f294f1427fa24 | [] | no_license | NaveenEdala/DocumentStore | d12176b0f490034b79c139786a9d6ce5dd538d7c | aea1fb37a0b9b81dbbf4768ed7483e59fba2285d | refs/heads/main | 2023-04-19T12:37:14.916492 | 2021-05-04T14:40:01 | 2021-05-04T14:40:01 | 363,547,595 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,158 | py | clientAES.py | from Crypto.Cipher import AES
import os
import tkinter as tk
import socket
counter = b'SIXTEENCHARACTER'
key = b'SIXTEENCHARACTERSIXTEENCHARACTER'
def encryption(ciphertext):
encryptor = AES.new(key, AES.MODE_CTR, counter=lambda: counter)
return encryptor.encrypt(ciphertext)
window = tk.Tk()
windo... |
385f31a7e84e89c734bd69924aee8bc65905163b | 0598a18be576a2699853446f7ced8746ee4d4012 | /bias_client.py | e94cab4bc36cae7ef639a18c8eadf1dd8127b709 | [
"MIT"
] | permissive | nightduck/bias_lighting | a9a1d7d23e7e5e1f29923a7dc3882567ffc548d3 | 43e7d0a3aaa739233f474971aa71302a06311790 | refs/heads/master | 2020-03-07T16:48:19.968866 | 2019-06-07T00:25:29 | 2019-06-07T00:25:29 | 127,593,866 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,076 | py | bias_client.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'client.ui'
#
# Created by: PyQt5 UI code generator 5.9.1
#
# WARNING! All changes made in this file will be lost!
import sys
import serial
import struct
import os.path
from binascii import hexlify
from client_ui impor... |
4f45f251ef2fefd549bd80dc3140c84211d802a1 | def301aceb592652db0dcac7e0c70c7622c34220 | /urls.py | d27010c7895c481c3c62fba6050e0c272e19b68f | [] | no_license | samofphx2019/synerd_9 | 6b704b1cc155d486afbe807b9ab18e110f5aed3c | 024b85794d59c290923d5fba815edc437969049d | refs/heads/master | 2020-08-28T19:19:50.074523 | 2019-11-05T02:44:29 | 2019-11-05T02:44:29 | 217,797,241 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 339 | py | urls.py | from django.contrib import admin
from django.urls import path
from personal.views import(
home_screen_view,
)
from account.views import(
registration_view,
)
urlpatterns = [
path('admin/', admin.site.urls),
path('', home_screen_view, name="name"),
path('register/', register_view, nam... |
951b41ef19116824f0e6e3a14e6c8845d77cc53c | 9e55be16f7cee5ab1e5d027a235febc70ad872d7 | /Seq2Seq/Seq2Seq.py | 3d7257ad1ad95b98407aa4773f2d66eeda66eb22 | [] | no_license | MirrorN/NLP_beginner | 3802b4a84d3b54e635fe53503bcd21a23553ef1f | 13584966f4afa66477916b5e2d0bb3ca3bec480c | refs/heads/master | 2021-06-25T01:07:15.727062 | 2021-01-08T12:45:10 | 2021-01-08T12:45:10 | 191,272,412 | 21 | 8 | null | null | null | null | UTF-8 | Python | false | false | 5,406 | py | Seq2Seq.py | """
Seq2Seq 模型的简单示例
任务:模拟一个翻译问题 只是这里模拟了一下翻译的文本 所以实际上模型用来得到一个单词的反义词
例如: man -> women , black -> white 等等
这里模型中使用了标准RNN单元作为 encoder 和 decoder,其中:
输入数据都被填充为长度为5的序列 并且添加decode开始以及decode输出的标志
在decoder阶段,只使用encode的最后状态作为初始状态(仅使用一次)
"""
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variabl... |
343132fe3611b66b5136480207868ac6509c8bc4 | a107fda28208935e9aa2734c07af99ef853d2334 | /ProjectUtils.py | 8f5dc93ee230263eb6f66741ff97c02ab79ee03e | [] | no_license | GoldwinXS/PokeGAN | 9f9393ba3902dddcaedcbd2e2fb7e81a9959eb1c | fd255e2e7faddccc830212e2f1697f67d6f84ec4 | refs/heads/master | 2022-12-16T08:16:10.684697 | 2020-03-17T20:38:54 | 2020-03-17T20:38:54 | 235,218,619 | 0 | 0 | null | 2022-12-08T03:49:35 | 2020-01-20T23:31:37 | Python | UTF-8 | Python | false | false | 3,298 | py | ProjectUtils.py | import os
def ensure_folder(path):
if not os.path.exists(path):
os.makedirs(path)
def make_GAN_gif():
import imageio, os
images = []
img_folder = 'GAN_images/'
save_folder = 'media/'
filenames = os.listdir(img_folder)
for i,file in enumerate(filenames,1):
try:
... |
d5300f3cbd2f65ef41d9778fa259d4af9a339b7f | ec0804a50de0fa769be5d26d1b80a5dddaa79318 | /models/train_classifier.py | 738e139ae0efe446487e4538a9a589f5a7730b42 | [] | no_license | denizcanyldrm/Disaster-Response-Pipeline-Project | c0090c9996779ac8358d86adfce8247b61470d87 | 586baf33ba99661297b1e2a11973b980690eee60 | refs/heads/main | 2023-02-20T15:21:29.387027 | 2021-01-23T13:51:11 | 2021-01-23T13:51:11 | 331,720,347 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,237 | py | train_classifier.py | import sys
import pandas as pd
from sqlalchemy import create_engine
import numpy as np
import re
import nltk
nltk.download('punkt')
nltk.download('stopwords')
nltk.download('wordnet')
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
from nltk.stem.wordnet import WordNetLemmatizer
from sklearn.p... |
4db91fcd05903d8dd4aaa5528083c4062603e2d4 | 6cdabc9d81a70fa1064f2beef7503df10cac9688 | /src/__init__.py | d22f647c1816b5be0dbf8485249b16e794ce620c | [] | no_license | aaronblanco/Api-ProyectoIndividual-sw | c6d17819181ae9fbaeb7dad303b713cd969b310c | 9ed87eab8241697f1438334c73e5ad8a7bb56658 | refs/heads/main | 2023-06-05T12:39:54.692203 | 2021-06-21T21:54:41 | 2021-06-21T21:54:41 | 355,939,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 802 | py | __init__.py | from flask import Flask
from flask_cors.extension import CORS
from .models import db
from . import config
##Inicializador, se usa cors para evitar problemas de bloquear las peticiones. Está consigurado para usar sqlalchemy. Mapeador de objetos relacional (ORM)
#Permite interactuar con la base de datos con objetos y f... |
82965dc4754aa5ad3a8d8d2229d690bb0e93140f | 06b47ce6bafcf16aac94d7e0a454ae946057ba82 | /src/pi_server/services.py | 62461d3d57bbc62edd861961fa1f8a3a65eaa252 | [] | no_license | wmigor/pi_server | 35f5b8fa586e178625bab0591733cd11fa2236e1 | ea06f149767c695a7fc3d57ca80f40799791eb8a | refs/heads/master | 2020-05-17T04:13:32.145950 | 2019-04-25T20:04:10 | 2019-04-25T20:04:10 | 183,361,770 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,758 | py | services.py | # coding: utf-8
import os
import hashlib
from datetime import datetime, timedelta
from pi_server import models
class Service(object):
model = None
def get(self, id_):
return self.model.select().where(self.model.id == id_).get()
def get_all(self):
return list(self.model.select())
class UserService(Service... |
a2b73e1c7c6413daa1bf2238d7a5d9f48d5ec053 | f14c6ce216e083f0f8ebb95307d12be6d1a8e263 | /api/__init__.py | b4d8ce6e28df93f43c6d042f00cf11769e1629ff | [] | no_license | sproutcoreisyournewbicycle/djangocore | fd808d0085b8d1a8018def8db25d76712cbcbdd3 | 9b339c8a69f66948d89cfb4046cf57a7deee6630 | refs/heads/master | 2020-05-15T03:57:21.685631 | 2009-10-13T23:07:50 | 2009-10-13T23:07:50 | 350,489 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,083 | py | __init__.py | """
Copied from Django's admin app.
"""
import os
from django.utils.importlib import import_module
from djangocore.api.sites import site
# A flag to tell us if autodiscover is running. autodiscover will set this to
# True while running, and False when it finishes.
LOADING_API = False
def autodiscover():
"""
... |
ab1f006069ebb244e676ff1fbabf8c033501dc77 | f6f178a04fd94f616f8c15a9f5fb21932d804832 | /Python/myModules.py | dfffab12cc6c9326e3925315c1c999ecb92865d4 | [] | no_license | NguyenDuyCuong/Learning | af804bd3bf62b685e267e54e7821840c4f11901f | c79571eec6f1880a4c0cc02eb60d2f987da91cb9 | refs/heads/master | 2023-09-01T10:45:18.253777 | 2023-08-23T04:48:30 | 2023-08-23T04:48:30 | 170,071,276 | 2 | 0 | null | 2023-02-28T18:30:12 | 2019-02-11T05:09:20 | JavaScript | UTF-8 | Python | false | false | 325 | py | myModules.py | # Consider a module to be the same as a code library.
# A file containing a set of functions you want to include in your application.
import mylambda as L
from mylambda import mydoubler
print(L.mytripler(11))
print(mydoubler(11))
# Built-in Modules
import platform
x = platform.system()
print(x)
x = dir(platform)
pri... |
dc15e322673ebce39ed199cb6d775b804a23f737 | 3fae8f06242dcefc82157649c6588da762923642 | /4.py | cf6347fa47726d99b6dee8bc47fe1279bbc183c2 | [] | no_license | AdrianPierzga216820/PP1 | 424acab8f9f6372c09862a7b9c7dc81f89dd7b7f | f848e98234b840f953a005e3479a2d34a8867049 | refs/heads/master | 2020-08-20T23:25:31.477881 | 2019-10-27T23:07:47 | 2019-10-27T23:07:47 | 216,077,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 87 | py | 4.py | age = int(input("give age: "))
print("more than 10" if age > 10 else "no more than 10") |
2e9b3c730dc8bac2ff4f45a0f53e97fd1ea3c346 | 13ad3340c750551c6d38394b6275efb52e14d561 | /util/DataPool.py | 188be46fd961642260b972e0a9a117003f6d2e09 | [] | no_license | five3/apiman | 0663e05f8a8751428867a16312d883486bb282c0 | bc779489fdf84d18859e4eb09390aed06e076f78 | refs/heads/master | 2020-12-02T11:05:24.792590 | 2018-05-16T10:12:50 | 2018-05-16T10:12:50 | 96,598,552 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,890 | py | DataPool.py | # -*-coding:utf-8-*-
from pymongo import MongoClient
import codecs
import json
import time
class MongoData(object):
def __init__(self, mongo_host, mongo_port, mongo_db):
self.mongo_host = mongo_host
self.mongo_port = mongo_port
self.mongo_db = mongo_db
def _read_mongo_(self, collectio... |
f2f022a6877664cb094d3a5999149e6fc98a5e00 | 246fbf42c5ad21fbcee1068e4c9151bd04e3f234 | /op_elm/OP_ELM.py | ca26432f94cdab9636167fe6f964be464c5bdcf1 | [] | no_license | TomWerner/skin_detection | 50223a1ea577d42d7c633fc603a78f2cc7621cb6 | 8139a198eeb75ce2f1169ef647914f638f979761 | refs/heads/master | 2016-08-12T10:51:03.098376 | 2015-12-11T02:00:18 | 2015-12-11T02:00:18 | 44,617,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,670 | py | OP_ELM.py | __author__ = 'Tom'
import numpy as np
import numexpr as ne
from scipy.linalg import solve as cpu_solve
import math
import pickle
from sklearn import preprocessing
import time
class SLFN(object):
"""
Single Layer Feed-forward Network
"""
def __init__(self, num_input_dimensions, num_output_dimensions):
... |
c32b0c58be1d49a55ea1c15b207feb241baea903 | bed3ac926beac0f4e0293303d7b2a6031ee476c9 | /Wrapping/Generators/Python/Tests/templated_pipeline.py | 0eb95cf98136837c2db563f36e6c6301a39984a8 | [
"IJG",
"Zlib",
"LicenseRef-scancode-proprietary-license",
"SMLNJ",
"BSD-3-Clause",
"BSD-4.3TAHOE",
"LicenseRef-scancode-free-unknown",
"Spencer-86",
"LicenseRef-scancode-llnl",
"FSFUL",
"Libpng",
"libtiff",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-permissive",
... | permissive | InsightSoftwareConsortium/ITK | ed9dbbc5b8b3f7511f007c0fc0eebb3ad37b88eb | 3eb8fd7cdfbc5ac2d0c2e5e776848a4cbab3d7e1 | refs/heads/master | 2023-08-31T17:21:47.754304 | 2023-08-31T00:58:51 | 2023-08-31T14:12:21 | 800,928 | 1,229 | 656 | Apache-2.0 | 2023-09-14T17:54:00 | 2010-07-27T15:48:04 | C++ | UTF-8 | Python | false | false | 3,116 | py | templated_pipeline.py | # ==========================================================================
#
# Copyright NumFOCUS
#
# 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
#
# https://www.apache.org... |
b75b643103e63f2c550f4ca07a0ffad856279c21 | d607b271e48a3ac6defb1fffef2a871dbf0be8d8 | /src/stress.py | dad2ff7c79db55fe126d289645d7112f4a71aa84 | [] | no_license | aakarsh/lp_solver | b7a9fcfe8f7eed47cbdc5df5b7d560f929f91819 | aee07884090e973c9af0f73c36b543d3e3ce926b | refs/heads/master | 2021-01-21T12:16:13.924425 | 2017-09-05T23:34:33 | 2017-09-05T23:34:33 | 102,057,160 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,015 | py | stress.py | #!/usr/bin/env python3.4
#
# Author : https://gist.github.com/dtrebbien/396973cccf906d3b9afe949bad8c0613
#
#
from __future__ import print_function
import sys
import numpy as np
from scipy.optimize import linprog
from scipy import optimize
import subprocess
def print_lp(n,m,A,b,c,file=sys.stdout):
print(n, m,file... |
bf54d207b3862fe08cfc3a2739f8c0a268fd90c2 | ccabf93f27ba8283e0db08512bbe9593efbaa015 | /web/utils/currency.py | f6781d74db1e201de4d30393eabc6fb843fa1380 | [] | no_license | uktrade/icms | 562b5956af863da1de581593157e72d989241aae | 525361b4856004cf34397d6c86fe5d6b6ebd3a89 | refs/heads/main | 2023-09-01T15:39:43.246325 | 2023-09-01T10:13:06 | 2023-09-01T12:30:39 | 178,028,237 | 7 | 6 | null | 2023-09-14T13:11:23 | 2019-03-27T15:56:34 | Python | UTF-8 | Python | false | false | 316 | py | currency.py | # TODO: Revisit this when we know how to calculate it.
def get_euro_exchange_rate() -> float:
return 1.11
def convert_gbp_to_euro(value_gbp: int) -> int:
"""Convert GBP to euros to the nearest euro."""
exchange_rate = get_euro_exchange_rate()
return round(value_gbp * exchange_rate, ndigits=None)
|
e95c6501b3f3e17a574ac2f83ad6d9a799d6fe56 | 905a957612a1b84345f4a3ef45d6cce8b4e532b6 | /assignments/19Editorial/src/exercise.py | 05ee6a32a9936ce419e73bcd49698bd0efb23714 | [] | no_license | C-CCM-TC1028-111-2113/homework-1-Jeipiii | a04b1201b8868c8ee6cd0db02c22fc62ab9823e4 | 7d3fc27acefd3d46cce2ad84f258bb1685bcb81f | refs/heads/main | 2023-07-17T07:09:29.392061 | 2021-08-26T19:32:38 | 2021-08-26T19:32:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 233 | py | exercise.py | costo_pagina = 54
num_palabras= 475
pagina = num_palabras
palabras = int(input("Dme el numero de palabras " ))
total = palabras / num_palabras
cobro = total * costo_pagina
print("El costo sera de: " + str(cobro))
|
9850f61c822190c004f88440f0ed4e715dc0c7e0 | a512edfa5d4b9ad93eb8d18347aecf3e4f948725 | /besut-website/assets/stemmer.py | 64ad8369aa598c6552d7588782f8a68e58297493 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | LTGRP/besut | 9061bcd81ac8f1adc4a2961a4d668d950493d50f | 4377024e55ca2fd45da671b00bb2a34f1d3622de | refs/heads/master | 2021-08-16T10:39:04.416593 | 2017-11-19T16:59:13 | 2017-11-19T16:59:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 771 | py | stemmer.py | # import StemmerFactory class
from Sastrawi.Stemmer.StemmerFactory import StemmerFactory
from Sastrawi.StopWordRemover.StopWordRemoverFactory import StopWordRemoverFactory
import sys
import math
sentence = ''
for word in sys.argv[1:]:
sentence += word + ' '
#print sentence
# create stemmer
factoryStemmer = Stemmer... |
754030efef0eac3619648920631670106aa4886e | 572afc77a246acb9483b47fc9e1839f47005d736 | /python/federatedml/util/data_io.py | d35f51687bbe0f93c15dee776a57958e9f34ac93 | [
"Apache-2.0"
] | permissive | FederatedAI/FATE | 7c787c308cca9ff46f287d24569c68de0a1cac07 | 8767db5ec0cb93784f64b290bc39b7b545c530fb | refs/heads/master | 2023-08-17T10:13:00.302529 | 2023-06-14T07:01:38 | 2023-06-14T07:01:38 | 167,349,656 | 4,942 | 1,571 | Apache-2.0 | 2023-09-14T07:02:29 | 2019-01-24T10:32:43 | Python | UTF-8 | Python | false | false | 47,723 | py | data_io.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... |
e1f4c891fec667a56a76bd5c2dd200c22a6bcf22 | 32a10341a5944f894c5aec18b3cd8d7cf471c0d4 | /dynamic_programming/stair_to_top.py | b83b9ad0c143aa34723e8c90e7bbc6d9d7c96add | [] | no_license | shubhamsinghrathi/algorithms | ff00e4552cb3d30db5fb5dc69e490337df2a3fba | db1aac3c31056a10b79022d0ceca0561284f7003 | refs/heads/master | 2020-04-05T03:31:34.294508 | 2019-04-21T18:30:10 | 2019-04-21T18:30:10 | 156,518,070 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 959 | py | stair_to_top.py | '''
Problem statement: You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
Solution procedure: We are using dynamic programming, where we are using catching of old and smaller results
So, when we have "n"... |
0e6dd664b169476fc5243fa8ed6cc35949f77a22 | c694c41bff4a04c55cebcd9d191dd4f3fc12d64d | /til20190129/mlp.py | 333b9a32c9891b2f6f656b24561167bf1b86c355 | [] | no_license | morifuji551/machine_learning | 64455512f31119ec89cf823f88a6baaab07b74cd | 99f559613e127e6497065f1c7b108fe806ad52b7 | refs/heads/master | 2020-04-19T04:48:44.373129 | 2019-02-05T00:14:13 | 2019-02-05T00:14:13 | 167,971,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,286 | py | mlp.py | import tensorflow as tf
import numpy as np
from keras.datasets import mnist
import keras
#### ml parameters #####
input_dsize = 28*28
batch_size = 128
epochs = 100
num_neurons1 = 300
num_neurons2 = 200
num_neurons3 = 200
classes = 10
########################
class hiddenlayer():
def __init__(self, inputs, ... |
f82cab54b454d0dbce97bb3b23e0de5b4bae9e41 | 1c48d2b7ea05dbec402c6e1c68e2fc10865ba960 | /Base/main.py | c30ba0f06b8d9dcd62dea5687c653454c71a79a6 | [
"MIT"
] | permissive | AlanDeveloper/Flask-Mail | f83e66eb99eb6615ac3b2aa6bb3c821c253eccde | f2d9245f4614d99645b480a861b311f56f274af1 | refs/heads/master | 2020-06-10T21:31:47.557182 | 2019-07-12T13:48:47 | 2019-07-12T13:48:47 | 193,724,207 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,064 | py | main.py | from flask import Flask, flash, render_template, request, redirect, url_for, session
from flask_mail import Mail, Message
from threading import Thread
from server import ServerDAO
app = Flask(__name__, template_folder='template')
app.secret_key = b'_5#y2L"F4Q8z\n\xec]/'
@app.route('/')
def index():
return render_tem... |
fb9b127549c0df443870179e4e5e101edba5d4be | 6686e73036e98e96d28403d63d124ede67ba1bd6 | /library/admin.py | 218f5354c52bf573dc997ac6ff37d795999a9f44 | [] | no_license | mat105/mediatory | 4488cbfbbd7741194e95e97e97b258485cd9dfb1 | 30aab457d792ef86a084705e865277fee468eae1 | refs/heads/master | 2023-05-14T22:31:34.616034 | 2021-06-11T17:57:04 | 2021-06-11T17:57:04 | 368,250,817 | 0 | 0 | null | 2021-06-11T17:54:33 | 2021-05-17T16:21:26 | Python | UTF-8 | Python | false | false | 122 | py | admin.py | from django.contrib import admin
# Register your models here.
from library.models import Tale
admin.site.register(Tale)
|
ca2f7802b1915d3b8e559e25c0d45edb0bf93f53 | 435360144d233c85ea23e50e05ee6edbfb4e4dd2 | /python网络数据采集/my_爬虫_进阶_之路/scrapy框架/my_spiders/巨潮资讯网/juchao_info_spider.py | ece1075c5f67d6317d1c82957f35cea0f3460954 | [] | no_license | liazylee/python | 5d56e1a60b6472660c30a3e7548da873f5ee3ebd | f90b5d18ad8375b2b0c951fa68e7e0041b016cc6 | refs/heads/master | 2020-04-03T18:24:39.434080 | 2018-10-30T13:00:27 | 2018-10-30T13:00:27 | 155,482,955 | 1 | 0 | null | 2018-10-31T01:56:47 | 2018-10-31T01:56:47 | null | UTF-8 | Python | false | false | 4,118 | py | juchao_info_spider.py | # coding:utf-8
'''
@author = super_fazai
@File : juchao_info_spider.py
@connect : superonesfazai@gmail.com
'''
"""
巨潮资讯爬虫
http://www.cninfo.com.cn/new/commonUrl?url=disclosure/list/notice
"""
from gc import collect
from requests import post
from json import dumps
from fzutils.spider.async_always import *
cla... |
1daa69ee47d1c5059ed4f592994c1bf7f84002f0 | 72a430fa8d01ed11c79a2b3646aebd2e999a4d3f | /utils/saveToWeb.py | f9af092432910a7bca83de3a5f1012939422e4d1 | [] | no_license | aplot249/mysanicpj | 220c86c24d8f110ae19954f9384e3649b075aa68 | 35b00d5ba908c17cad5e66c09b905b55e7829c9a | refs/heads/main | 2023-07-16T22:57:18.777730 | 2021-08-23T21:22:50 | 2021-08-23T21:22:50 | 378,983,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 700 | py | saveToWeb.py | #@author: sareeliu
#@date: 2021/7/22 21:30
import requests,pathlib
from requests_toolbelt import MultipartEncoder
def down_img_and_save_to_web(title,img,link):
imgcontent = requests.get(img)
img_save_path = 'douyin/img/'+title+"."+str(img).split('.')[-1]
with open(img_save_path,'wb') as f:
... |
9c96e597209961e062662f8af1cb33a81511904c | 75a2eb461edc4736acad3f0d274b33af7a181886 | /python/begin_python_3rd/ch4/dict.py | b7d06430b24b2aae4215ceba1276e95e10dbdbf1 | [
"Apache-2.0"
] | permissive | wtsai92/mycode | 3ae79f0f5f03c0e2db346d54fa5c9b1c9e67669a | 3f952859735d27435a79e8aae674eac9fd277bd8 | refs/heads/master | 2023-07-19T17:57:58.871159 | 2018-02-24T08:50:37 | 2018-02-24T08:50:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,304 | py | dict.py | # 字典 dict
phonebook = {'Alice': '1234', 'Beth': '9102'}
# 空字典
emp_dict = {}
# 键值对序列创建字典
items = [('name', 'Gumby'), ('age', 18)]
d = dict(items)
print(d)
d1 = dict(name='Abc', age=18)
print(d1)
# 字典方法
# clear
d = {}
d['name'] = 'Tom'
d['age'] = 18
print(d)
returned_value = d.clear()
print(d)
# copy 浅复制,值为原来的
sd = ... |
6346911f64461ba71fb1cc4fa943486e7123021f | 627cca9406c31ce30c493ff7502f79eb4c57eee3 | /xcha/simulator/simulator_protocol.py | e61252acafe3c26205051632cde7a1f299a0c8a1 | [
"Apache-2.0"
] | permissive | blockchiansea/xcha-blockchain | 40c6d36813f671e94316a522904238f495f39f6b | 7de0ba89056236e30069aef12fe25843f6093bcf | refs/heads/master | 2023-07-26T02:36:57.654196 | 2021-09-06T06:04:21 | 2021-09-06T06:04:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | simulator_protocol.py | from dataclasses import dataclass
from xcha.types.blockchain_format.sized_bytes import bytes32
from xcha.util.ints import uint32
from xcha.util.streamable import Streamable, streamable
@dataclass(frozen=True)
@streamable
class FarmNewBlockProtocol(Streamable):
puzzle_hash: bytes32
@dataclass(frozen=True)
@stre... |
244766a8679956d69ffd68b508cd3a98bd40ca08 | 7b398d5fea751fd629e432de496fadfcfe1a5938 | /tkinter project skeleton/app.py | ca07accba3658dab521144a3f10975a1e1d9991c | [] | no_license | junohkwon/Python2_2 | c81ca5c414e500ed711da269c354fea7fb997708 | a9feb59287ef7e6c29d2de4cce379ef688b562c6 | refs/heads/master | 2020-03-27T10:25:47.680026 | 2018-09-29T12:31:39 | 2018-09-29T12:31:39 | 146,419,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,154 | py | app.py | from maintable import *
from conveyor import *
from PIL import Image, ImageTk
from tkinter.messagebox import *
class App(Frame):
def __init__(self, master, num):
super(App, self).__init__()
self.master = master
self.num = num
self.load_images()
self.frame01 = Frame(self.mas... |
46f9325fe553fe9f8cd4b151961a9614ea06cfcd | 4aa5d0c2960916fc5aecbae393b3a4c82798e65d | /models/onnx_detector.py | 60c27b37163112f5f99fbc8a28c7c72015062eb1 | [] | no_license | PanJinquan/torch-Slim-Detection-Landmark | 51356bf9582cce84dd2be41e75a2e01c9103b790 | 40400a6ff7376f933899e7f4fead9f994c39d3fe | refs/heads/master | 2023-06-28T15:53:22.624102 | 2021-07-29T02:54:30 | 2021-07-29T02:54:30 | 377,344,971 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,715 | py | onnx_detector.py | # -*-coding: utf-8 -*-
import os, sys
sys.path.append(os.getcwd())
import onnxruntime
import onnx
class ONNXModel():
def __init__(self, onnx_path):
"""
:param onnx_path:
"""
self.onnx_session = onnxruntime.InferenceSession(onnx_path)
self.input_name = self.get_input_name(... |
8caf02a499f09da83b5775422b811a88bf19b8f1 | a03d1e0ef667947ff6a378ca0ea2dac9c7c6a352 | /api/models/Contact.py | 8cbd40612253e7b85e1b0ac7e4a7f550c4131d50 | [] | no_license | naveedalfarhan/MyPathian | 8fd9a1f05c8bdd0eb5d1ba786c9250bef4c27b2d | ce5283350ff6217e664eee564678dac29937b23c | refs/heads/master | 2021-01-10T07:02:48.564339 | 2015-10-01T11:28:57 | 2015-10-01T11:28:57 | 43,492,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,543 | py | Contact.py | class Contact:
def __init__(self, p=None):
self.id = None
self.first_name = None
self.last_name = None
self.full_name = None
self.title = None
self.email = None
self.comments = None
self.address = None
self.city = None
self.state = None... |
4af5bcd79ff134b039fbbabcc05e3c9f066b93a6 | 1a732e3fba1ad40ad30ba155cd5d5e3c61892244 | /Drivers/pynative(practice)/pattern (2).py | 4784d1b9d7a58a94a456928cc8902154a1a5eecf | [] | no_license | vrushtipateUSA/AutomationRepo | 467382f678c693c8951d34a47b2fe0b5faa3ecd9 | 3e6581bef537bb333ed4155885c36e8c2e565706 | refs/heads/main | 2023-05-11T13:54:23.134063 | 2021-05-31T03:51:28 | 2021-05-31T03:51:28 | 371,862,547 | 0 | 0 | null | 2021-05-31T03:43:18 | 2021-05-29T02:29:07 | Python | UTF-8 | Python | false | false | 450 | py | pattern (2).py | n= int(input("enter a value"))
for i in range(n):
if (i==0):
print("*", end=" ")
for j in range(n//2-1):
print(" ",end=" ")
for j in range(n//2+1):
print("*",end=" ")
elif(i<n//2):
print("*",end=" ")
for j in range(n//2-1):
print(" ", e... |
2a0dbdbc2fdd6fbf2cc10e6b33784258e86af209 | 91dac7925c323b8f5d2b914f6a5e0c7e847effde | /models/ha.py | 8757bfc9c10a999a131cfce1967689d362836322 | [] | no_license | Jonnathangte68/aha | 1ca6b27e35ccbb7f0dd579546cfb2cde9e647999 | e28bc44f59da7503b3dda58ae9daa025c1081912 | refs/heads/master | 2020-03-17T11:42:15.163887 | 2018-06-01T22:58:09 | 2018-06-01T22:58:09 | 133,561,248 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 38,765 | py | ha.py | # -*- coding: utf-8 -*-
from odoo import models, fields, api
import requests
import logging
import random
import string
import xlsxwriter
import datetime
from datetime import date
from io import BytesIO
import xlwt
from openerp.exceptions import except_orm, UserError
import math
import cgi
import pytz
import calendar
... |
60258a1f3cdf3c19491fb1ef2d0f11220c6589c3 | 4c45bc5032f63da832f1d011794ed30dd1e7c8d2 | /day11/day11_1.py | bee4fb8c5b36a0aa5bfcda6968c176de4215133b | [] | no_license | stokworks/AdventOfCode2020 | 33708b8c2043b92bddd56450dd9e770c9f57d153 | 042178f7d75d0e8bf9ef79ade988c7ab2275a36a | refs/heads/main | 2023-02-05T07:26:18.262684 | 2020-12-24T06:02:13 | 2020-12-24T06:02:13 | 317,570,594 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,182 | py | day11_1.py | #! /usr/bin/env python
import copy
import sys
NONE = '.'
EMPTY = 'L'
OCCUPIED = '#'
def count_adjecent(seats, y, x):
n_occupied = 0
for dy in range(-1, 2):
for dx in range(-1, 2):
if dy == 0 and dx == 0:
continue
n_occupied += int(seats[y + dy][x + dx] == OCCUPIED)
return n_occupied
def do_round(seat... |
4ba75f01fb15fc690973e1e6eb37ad678430fa07 | 7afafca3668859655b289c6620b838c1faa0a8ac | /lib/Python/libPktTemp.py | ba3d7619a5ef91c24dbfbd712cae85620d2a820c | [] | no_license | pablosistemas/temp | 0e178bf5ee457674945d994af5539b91bf435c20 | d556bf1de15af5f6b4e65789de6f0c905d33f3f8 | refs/heads/master | 2020-06-08T16:37:05.133415 | 2015-11-07T15:50:37 | 2015-11-07T15:51:56 | 42,214,425 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,244 | py | libPktTemp.py | #!/usr/bin/env python
from NFTest import *
try:
import scapy.all as scapy
except:
try:
import scapy as scapy
except:
sys.exit("Error: Need to install scapy for packet handling")
############################
# Function: make_TCP_hdr
# Keyword Arguments: src_PORT, dst_PORT, seq_NUM
# Descri... |