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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1eeaf5a7f047e5c5e2c0bc568c9a7201657dec9d | e15fb687990589783066669784912ea8ac5bacaf | /genome_designer/main/tests/test_models.py | c90b78c73f6ed5009c607c56325335f71cd1b392 | [
"MIT"
] | permissive | RubensZimbres/millstone | 74d32105fa54104d0597b6789fb2871cb4fbd854 | 898936072a716a799462c113286056690a7723d1 | refs/heads/master | 2020-03-16T18:57:55.174716 | 2018-03-07T16:40:14 | 2018-03-07T16:40:14 | 132,894,394 | 1 | 2 | null | 2018-05-10T12:01:34 | 2018-05-10T12:01:33 | null | UTF-8 | Python | false | false | 12,961 | py | test_models.py | """
Tests for models.py.
"""
import json
import os
from django.conf import settings
from django.test import TestCase
from utils.import_util import import_reference_genome_from_local_file
from utils.import_util import copy_dataset_to_entity_data_dir
from main.models import AlignmentGroup
from main.models import Chrom... |
b62645c4e146a7771c2b1c54683b3a995162eacb | e27d26414703373534a1ef2a0bb2e1c0dc8a3499 | /tools/covert_timestamps.py | 10c6e38f39a197e3319e5d5981be23bdf5c2c588 | [] | no_license | BingFull/gazenet | afc6a37ce5104303d25b963db6198a568f33f0d7 | ff8bc5cbcb7ec52202c7f2f6301fe72e11172695 | refs/heads/main | 2023-04-25T15:45:56.625820 | 2021-05-15T09:01:05 | 2021-05-15T09:01:05 | 330,295,285 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,397 | py | covert_timestamps.py | import csv
from datetime import datetime as dt
from csv_utils import read_key_value_file
csv_path = 'gaze_positions.csv'
info_path = 'info.csv'
dst_path = 'gaze_positions_convert.csv'
def read_info(info_path):
with open(info_path, 'r') as info_fh:
info = read_key_value_file(info_fh)
synced = float(i... |
dc76a15fc227cfd363d6841b690479993985932d | 17625d7595999014b0975b553c90560a84589b94 | /dtlpy/repositories/ontologies.py | dfc2f6f33191564ba224c1b7e53c35a5748a96a6 | [
"Apache-2.0"
] | permissive | dataloop-ai/dtlpy | 8055e4071aadaeef7434e176db49fb142514627d | 54f86662095e74ccd2ba59e928410725ae5bf354 | refs/heads/master | 2023-09-03T23:41:55.954906 | 2023-08-28T13:08:45 | 2023-08-28T13:08:45 | 170,350,945 | 16 | 17 | Apache-2.0 | 2023-01-29T09:46:21 | 2019-02-12T16:24:37 | Python | UTF-8 | Python | false | false | 19,577 | py | ontologies.py | import logging
import traceback
from .. import entities, miscellaneous, exceptions, _api_reference
from ..services.api_client import ApiClient
logger = logging.getLogger(name='dtlpy')
class Ontologies:
"""
Ontologies Repository
The Ontologies class allows users to manage ontologies and their properties... |
f1f84ac6dd62b21422a9b5bb2758d408c5972bec | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-integrations/connectors/source-qonto/source_qonto/endpoint.py | 71595f7deacb1f155a441424953a477775fc7ebc | [
"MIT",
"Elastic-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 508 | py | endpoint.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from typing import Dict
QONTO_ENDPOINT_MAP: Dict = {
"Sandbox": "https://thirdparty-sandbox.staging.qonto.co/v2/",
"Production": "https://thirdparty.qonto.com/v2/",
"Test Mocked API Server": "https://stoplight.io/mocks/qonto-next/business-api/8... |
e27d97e69fd373118f4cc9028b803d1457c7dfa3 | 8767534e520d54808cd752ac7ec201940cada93f | /alipay/aop/api/domain/KbAdvertMissionResponse.py | 3b92a126a30d18b1589b63735828cdc91cc27d37 | [
"Apache-2.0"
] | permissive | articuly/alipay-sdk-python-all | 91375f118e226f8c77990dfb750b45808dca7aab | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | refs/heads/master | 2022-12-22T11:41:12.973444 | 2020-10-09T09:37:27 | 2020-10-09T09:37:27 | 300,192,401 | 0 | 0 | Apache-2.0 | 2020-10-01T07:45:38 | 2020-10-01T07:45:37 | null | UTF-8 | Python | false | false | 4,038 | py | KbAdvertMissionResponse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.KbAdvertSubjectResponse import KbAdvertSubjectResponse
class KbAdvertMissionResponse(object):
def __init__(self):
self._gmt_claimed = None
self.... |
874f706812d6f5f17e9dc562ee3d05f8397e0cba | 5a1400738de80313b7023f223ffe39db8fd240ac | /setup.py | a134518f48d05d3103667a2b74c0f2c21c183ee3 | [] | no_license | eazye-dit/nct-backend | 9d914003fdd0f5a37138f0ee5c8a7f59b7888015 | 33e0c47c5d8ddc91eb2d2244ca1257e1193b1a59 | refs/heads/master | 2021-04-06T17:51:49.488173 | 2018-08-27T17:40:45 | 2018-08-27T17:40:45 | 124,380,812 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='nct-backend',
version='0.2',
description='NCTS backend',
author='cn',
author_email='lolexplode@gmail.com',
packages=['nct'],
install_requires=['sqlalchemy', 'psycopg2', 'passlib', 'flask', 'flask-sqlalchemy', 'flask... |
208075d25afb2d81af65af11f41f39b64e1f9e1a | 64dc38db8a622af5e702af0258f8f068add1eb04 | /crawler/adi-crawler/crawler.py | cd03bb4cc142e0bc162120d7719fb92ef570eccd | [] | no_license | ziraoshi/falcon | e473ead7f5017bd051b32b38b591500b388e7e2f | b93ce01c5e43426ba0589af583014eee7facef67 | refs/heads/master | 2021-01-15T13:42:57.996781 | 2014-06-06T11:44:37 | 2014-06-06T11:44:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,221 | py | crawler.py | #!/usr/bin/env python
#coding=utf-8
import urllib2
import urllib
import re
import time
from xmlrpclib import ServerProxy
import threading
import httplib
import os
import login
import ast
import getWeiboPage
import Analysis
import string
id =0
pagecount = 1
fansdic = None
class Crawler():
"""docstring for crawler"... |
65c623f0245ce93b575864261fca90338b0fd951 | 40f8f00ef7a6dc954f0ce09f5bee0d1c45ff2560 | /demo/demo.py | e96ca9890d62c2eebdc8add15a66e31ca568dee6 | [] | no_license | guoyu07/alipay-sdk-python | 4882bf6465da2fc2bc2e034a597e461c105465e7 | d5d53646c6135a7c65ad4a814b0bc304361026e5 | refs/heads/master | 2020-03-13T06:02:33.419969 | 2017-12-29T06:42:27 | 2017-12-29T06:42:27 | null | 0 | 0 | null | null | null | null | GB18030 | Python | false | false | 2,868 | py | demo.py | # -*- coding: gbk -*-
'''
Created on 2017-12-20
@author: liuqun
'''
import json
from alipay.aop.api.AlipayResponse import AlipayResponse
from alipay.aop.api.DefaultAlipayClient import DefaultAlipayClient
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.util.WebUtils import FileItem
import logg... |
6a3d26f67774cabe4ff91853fd037d4b0d6bccf5 | 4a5eb32f0ce7d33b7e231b54f568164e4346a2dd | /Py_FS/wrapper/nature_inspired/RDA.py | b0e55e3eed59eaa432d66e7bb0edf71dcca1def9 | [
"MIT"
] | permissive | the-amirhosein/Py_FS | a2fae8ad737caa30f34fb228ca0271575b5418e3 | 1a096b83df12b5c7a43b2839d6ad590b3a37ba58 | refs/heads/master | 2023-03-01T18:10:18.269802 | 2021-02-08T02:07:36 | 2021-02-08T02:07:36 | 338,003,788 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,752 | py | RDA.py | """
Programmer: Bitanu Chatterjee
Date of Development: 14/10/2020
This code has been developed according to the procedures mentioned in the following research article:
"Fathollahi-Fard, Amir Mohammad, Mostafa Hajiaghaei-Keshteli, and Reza Tavakkoli-Moghaddam.
'Red deer algorithm (RDA): a new nature-inspired meta-heur... |
f865f5cbc5a0f230c1ab83e1f9ff843902466723 | 03797de33f7fbebfe7362dab744bd9001c60ddc1 | /settings.py | cbc27218a4111e7f06a9d8d3e99f51628ed85c5a | [] | no_license | evg-cv/PersonTracker | c67864206ce1113ca22ab9a984f2d14754967bd0 | e0efabab51a896511affcea6bafc9bf882ec59bc | refs/heads/master | 2023-02-23T12:56:00.787732 | 2021-01-28T13:35:31 | 2021-01-28T13:35:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 751 | py | settings.py | import os
CUR_DIR = os.path.dirname(os.path.abspath(__file__))
MODEL_DIR = os.path.join(CUR_DIR, 'utils', 'model')
CAFFEMODEL_PATH = os.path.join(MODEL_DIR, 'SSD_MobileNet.caffemodel')
PROTOTXT_PATH = os.path.join(MODEL_DIR, 'SSD_MobileNet_prototxt.txt')
YOLO_WEIGHT_PATH = os.path.join(MODEL_DIR, 'yolov3-tiny.weights... |
d556803d7425959f011ec21a97aa956b5a29eaaf | f1b4946fdbc27efa7632d4d1b41398d48ae79e3b | /code.py | ac839af4fc758c460493a83d298d84f0ba72d3b2 | [
"MIT"
] | permissive | devtruerimco/domain-classification-text | 6474dbf4ce4c6772e386c4cbf4a25792a77710bd | 3ee696d1416b8fc52b0f0e8f71b7438ce27d3bd5 | refs/heads/master | 2020-12-08T13:36:13.990419 | 2020-07-12T08:52:38 | 2020-07-12T08:52:38 | 232,995,328 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,077 | py | code.py | #In this task we will load the dataset and perform a basic cleaning in order to simplify our futher steps.--------------
import pandas as pd
import os
import numpy as np
import warnings
warnings.filterwarnings("ignore")
# path_train : location of test file
# Code starts here
df=pd.read_csv(path_train)
... |
aa8e08ccf3446b448c563a720bc47a1d7f101473 | 132fd2c8cfe151af2d397375599296a12b3e277e | /parse_stars/mast.py | 0a752f9e9bf4ad8a9ec98ff3eb85dcebb550101c | [] | no_license | kongcho/solar_data | 3735f89c0d0802fd3affa94d9e2ab7be94fe3ad4 | 53433782b601ea0d5cb297003e12186cf71481a2 | refs/heads/master | 2021-06-30T08:35:45.421883 | 2019-03-28T18:51:19 | 2019-03-28T18:51:19 | 109,524,776 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,171 | py | mast.py | from settings import setup_logging
logger = setup_logging()
import requests
import json
class session(object):
def __init__(self, url):
self.url = url
def get(self, params=None, **kwargs):
r = requests.get(self.url, params, **kwargs)
if r.status_code != 200:
logger.error("... |
8242d86e91fe45668c08ad3c32dcf18dc3eee52a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03418/s753447740.py | 1fd8cf9d88f7882a39531ef9076b439ed01cc59d | [] | 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 | 216 | py | s753447740.py | n, k = map(int, input().split())
# k=0 -> n*n
if k == 0:
print(n * n)
exit()
cnt = 0
for b in range(1, n + 1):
r_cnt = max(0, b - k)
cnt += (n // b) * r_cnt
if n % b >= k:
cnt += (n % b) - k + 1
print(cnt)
|
43ddcb8ab93c85ef80adbf9a5166a9c8b7c4c8cd | c1797bf3f85f73f9dac3c69bfa26bba0e31e8394 | /Configuration.py | 6fca296e8449b479287e4f2153cd16aa392229cc | [] | no_license | santoshsahini19/scene-segmentation-project | f594273339ab12c9acc6e62b254d688b7ba72f73 | 58a787660da4b35f783bb9b1b036cdebde8b33f2 | refs/heads/main | 2023-03-15T01:27:27.651374 | 2021-03-20T01:42:51 | 2021-03-20T01:42:51 | 345,841,286 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | Configuration.py | class Config:
def __init__(self, data_settings, model_settings, shot_num):
self.data_settings = data_settings
self.model_settings = model_settings
self.shot_num = shot_num |
7f746e5121a8a53c2d32f498ad2f2d0b4647c4b9 | 3d05a2c6bab0b4e4b31771ba14c2441e100880bb | /line_study/HD2905/SONG.py | 13d938fdfe5b1815d663c0aa16d3cf5c16a2a4c8 | [] | no_license | carlosm97/Summer_project | 928319eea7ccf4f002f943773ac12e8c6ef559b6 | 2449cd9b58180393735425a1c310cea987f0c9ed | refs/heads/main | 2023-08-16T12:29:13.583129 | 2021-10-06T16:22:24 | 2021-10-06T16:22:24 | 389,576,746 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,294 | py | SONG.py | # In[header]
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 2 10:49:06 2021
@author: charlie
"""
import astropy.io.fits as pf
import numpy as np
import matplotlib.pyplot as plt
import os
os.chdir('/home/charlie/Desktop/MSc/Grant/IAC_Science/Project/pyIACOB')
from scipy.optimize import curve_... |
7aedabdfeaa9b1d7feec2a49792ae4cd2081502f | 568e532df064823bad40f1f84366cf20e62eb2fe | /Leave/models.py | d9ed03f97d58c24484ef2f04ed2a58f7fbc07837 | [] | no_license | sunnam1996/Holiday | 0e59223aed85f87033516f54ea4055c32c751ec3 | e33db3efd5dc5866f85433eee8549e869124e18c | refs/heads/master | 2020-08-01T14:12:28.914420 | 2019-09-26T06:45:35 | 2019-09-26T06:45:35 | 211,019,217 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 598 | py | models.py | from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class LeaveAppUser(AbstractUser):
pass
# class Leavetype(models.Model):
# name = models.CharField(max_length=20,blank=False)
#
# def __str__(self):
# return self.name
#
#
# class Postleave... |
da71c533e92544a8985865f45457d51327257c77 | d195253bdaf71ae18bbc96fa9fd6f56ccbfa4051 | /ExerciseSpider/spiders/utils/util.py | af691d0ee1dec19ba824afe9b72869a23af0c6a2 | [] | no_license | eduwechatapp/ExerciseSpider | 3deaef5d60b15ca11b5ba9784c9d28618ea402ba | 7f8c07b108e7b792a2c5411578fd0c68dbd54b66 | refs/heads/master | 2021-08-08T07:25:47.032766 | 2020-06-05T15:36:21 | 2020-06-05T15:36:21 | 187,313,099 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,292 | py | util.py | import hashlib
import re
import time
from lxml import etree
def get_full_analysis(analysis):
res_full = re.match(".*试题分析:(.*)考点:(.*)点评:(.*)", analysis)
res_second = re.match(".*试题分析:(.*)考点:(.*)", analysis)
res_first = re.match(".*试题分析:(.*)", analysis)
if res_full:
question_analysis = res_f... |
08e8cb26a0020ebe06376f89dfb6d405e4c7dd64 | 09a7f3a9277b1635e5bc78af2644138aa20cf331 | /scripts/gitter_releases_bot.py | a033d0d69ec9bed90e3d347eacd3a40ace269901 | [
"MIT"
] | permissive | samuelcolvin/fastapi | 9352e6359e7fc000e1c0c68e424768488f0c1377 | 8ac8d70d52bb0dd9eb55ba4e22d3e383943da05c | refs/heads/master | 2023-08-31T07:54:06.149147 | 2023-04-25T19:12:33 | 2023-04-25T19:12:33 | 212,307,119 | 5 | 1 | MIT | 2023-02-23T11:25:58 | 2019-10-02T10:04:50 | Python | UTF-8 | Python | false | false | 1,770 | py | gitter_releases_bot.py | import inspect
import os
import requests
room_id = "5c9c9540d73408ce4fbc1403" # FastAPI
# room_id = "5cc46398d73408ce4fbed233" # Gitter development
gitter_token = os.getenv("GITTER_TOKEN")
assert gitter_token
github_token = os.getenv("GITHUB_TOKEN")
assert github_token
tag_name = os.getenv("TAG")
assert tag_name
... |
af77da7d48dc8702bb4c9882d34fe9ac95736d83 | f0f6975ba8dfaa6d6d6851d1b1c5ff01797555fb | /tesoreria/models/plantillas/estadistica_ubch_reporte.py | 23fc8b6dc6952e0cafdd096dff3bf5d23d6181b8 | [] | no_license | kailIII/Modulos-BVA-OpenERPv7 | 4805c856781b2c595a05d805f263a0fcde1ef548 | 2f983d068b06cf4b9a275e3ba616351a94173287 | refs/heads/master | 2021-01-22T17:15:13.883632 | 2014-10-05T01:58:22 | 2014-10-05T01:58:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,707 | py | estadistica_ubch_reporte.py | # -*- coding: utf-8 -*-
import time # Necesario para las funciones de Fecha
import clases_reportes
import unicodedata
def gen_est_centros(cr, estado):
#Variables globales
j=0
k=0
item = 0
F_totales = 0
M_totales = 0
TCD_totales = 0
FCD_totales = 0
PCC_totales = 0
total_integrantes = 0
#Variables muni... |
6c0eba8ba8cbf643b527f1ce5f1b822f238d9fd0 | cfd0c513fe39b502d50f260a9d296c75155e12b3 | /scraper/get_label_info.py | 6fb33770966e80462297580fe906265f8b2b4ee7 | [] | no_license | NathanWycoff/LyricalMiracles | 18aa08f882691254ad3a2aca354a892042e04f00 | 67add9c67471373bab71e5827e2d50a6d939b60b | refs/heads/master | 2021-03-24T10:34:42.508315 | 2018-03-30T20:32:24 | 2018-03-30T20:32:24 | 123,218,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,276 | py | get_label_info.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# get_label_info.py Author "Nathan Wycoff <nathanbrwycoff@gmail.com>" Date 01.15.2018
### Scrape some info about record labels for each line in the target file, which should represent a song, by searching wikipedia
from bs4 import BeautifulSoup
import urllib2
import url... |
5830a6001d7db50002c44aede6fb10938fa01dd1 | 5d6704f6144adfd145e2e38eff43581ee6e1ffb0 | /object_model.py | eb9a1fcd99037a2b7851e6b54e7450dc84175dde | [] | no_license | ghb7688/mctest | 5b2263f683dde7567fe1b93f3fd4e4dcec8392a3 | a6c2d68e2c992077e377bd069fca9c0f2202277f | refs/heads/master | 2016-09-05T20:31:02.430185 | 2015-04-13T04:40:52 | 2015-04-13T04:40:52 | 31,083,628 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 998 | py | object_model.py | import nltk
class Text(object):
def __init__(self, text):
self.text = text
self.words = nltk.word_tokenize(text)
self.sents = nltk.sent_tokenize(text)
class Passage(Text):
def __init__(self, title, story, questions):
Text.__init__(self,story)
self.title = title
... |
d2c31d9c3cc66b43966cfd852582539d4e4bea17 | dd46c2eed4291a2b6895401e6c18442bb59c70de | /科大讯飞/CDC工具/2-cdc下载病例.py | e214cc0326e61565e6024efa3fe1eebf17b9399e | [] | no_license | linzhongxiazhi/student_python | 0894b3f7e23b516a5ffc6bc056d3a3d77589338d | 0bbd71ea2f0b9c886f4cbecc9a1e2a3d8fec6ffe | refs/heads/master | 2023-06-30T21:38:23.624449 | 2021-08-07T15:20:03 | 2021-08-07T15:20:03 | 393,718,479 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,630 | py | 2-cdc下载病例.py | from selenium import webdriver
import time
import datetime
import os
import openpyxl as vb
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.action_chains import ActionChains
def deconnexion(Chrome):
"""登陆"""
"""初始化"""
global web, actions
web = webdriver.Chrome(Ch... |
213ab22a269abc8180524462a8966e5d929ef7d1 | 8fd95d9bbabd667e551542decb5bfe4344e01c4c | /web/utils.py | 6efd8f5e80d4c465c81b5713ae383c9e269fbae8 | [] | no_license | frdeso/2016-web | 6974977f69e198e09cff42a0d5beb17830ed8210 | fdb28fb9378d913db6f24815c57c6118060b76a6 | refs/heads/master | 2021-01-17T10:02:50.688709 | 2016-09-15T12:33:12 | 2016-09-15T12:33:12 | 68,291,518 | 0 | 0 | null | 2016-09-15T12:24:06 | 2016-09-15T12:24:06 | null | UTF-8 | Python | false | false | 907 | py | utils.py | import os
import json
import codecs
import markdown
from flask import current_app
def get_json_file(filename, lang='en'):
"""
Get the contents of a JSON file.
"""
filepath = os.path.join(current_app.config['APP_PATH'], 'data', filename)
with open(filepath, 'r') as f:
return json.loads(... |
398263b65fd98003f27020e46ae38e913dc5dd45 | 34dd03af6762e14c907bb6047f25114029a59249 | /app.py | 50bb19603c6340f12788776e9d358d2bc393270a | [
"MIT"
] | permissive | BriceChou/aispider | f6b7796664c18dc40570cb6f2f9a3e2988a85694 | 5024dafde17c6767be581b54123e8ad9fa9b9773 | refs/heads/master | 2021-01-01T18:47:19.709944 | 2018-08-08T08:16:32 | 2018-08-08T08:16:32 | 98,438,123 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,634 | py | app.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Brice Chou'
import os
import lib
import sys
import time
import getopt
import training
try:
import cv2
import h5py
except Exception as e:
error_info = 'Please install h5py/cv2 tools first. Error: {}.\n'.format(e)
print('\033[0;31m%s\033[0m' ... |
606e40dd073c3efc95ef01a08466fd536a28f140 | 22d13b59cf8dd9fba62c81ab35245bbdd9362a56 | /twittmapapp/cron.py | 476d3ea0cb6804cf711d146c9f0cf6b9b0f6fa19 | [] | no_license | Maddy93/TweetMapper | 8d836cd3332bb1556eb1ba0538f8adf93703854d | 92b2753465e6525f9ebbf236f3e159289704715d | refs/heads/master | 2021-01-10T00:53:31.290749 | 2014-12-05T05:59:17 | 2014-12-05T05:59:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 709 | py | cron.py | from slistener import SListener
from slistener import track
import datetime
import time, tweepy, sys
import json
import re
#def tweet_collector():
consumer_key='qpUR91PwjvChszV0VFgrc4Hje'
consumer_secret='q9mPUZE2OsFbaqKUF32ZsY1ry4anZ1k8pNSne56wc3HInmERFu'
access_token='2845943577-R0g6YRlrdEqSFb2mKy5HXuByQPdpq4TLGrPkm... |
86ca94820c05b3f63f4a733b6d1fa7eb9dea6a5d | 7a9dec211cacc3def4c1e47a9c2050fe88c3d0ed | /image_transport_ws/build/catkin_generated/order_packages.py | 6593f569628f1370459b78f6036ab94f381b1aee | [] | no_license | songsong1996/Capstone-Project-Obstacle-Avoidance-Strategy | 948c9709753adbc2ee944f49029d82c48d31b4e1 | 74dd22a8505d6e9a732d74be2c9b6a78eef1d71f | refs/heads/master | 2021-04-02T17:47:38.694379 | 2020-03-18T19:42:56 | 2020-03-18T19:42:56 | 248,300,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | order_packages.py | # generated from catkin/cmake/template/order_packages.context.py.in
source_root_dir = "/home/songsong/image_transport_ws/src"
whitelisted_packages = "".split(';') if "" != "" else []
blacklisted_packages = "".split(';') if "" != "" else []
underlay_workspaces = "/home/songsong/image_transport_ws/devel;/home/songsong/pi... |
095d7abfc8297e0bf741a4ebb351a7776055623f | 0140ea7b4dfa1ebc718bfe3fcb911b9cd7431c9f | /Terminal_groups/Terminal_groups/StiffeningAnalysis.py | 69989ed56e57f5e394046fd252d81a4944538bd8 | [] | no_license | joeburg/phd-research | 22cb9de52a3a538695bc526497e1aa6ca4cbe2f5 | d898bc998edcd0e43224ffa4ada3c83db2693b82 | refs/heads/master | 2022-12-22T21:52:04.593363 | 2017-06-22T01:42:06 | 2017-06-22T01:42:06 | 93,906,732 | 0 | 2 | null | 2022-12-15T03:07:21 | 2017-06-10T00:42:00 | POV-Ray SDL | UTF-8 | Python | false | false | 3,859 | py | StiffeningAnalysis.py | ''' The previous code does not correcly compute the stiffening coefficients
This program uses the clustering data to re-compute the stiffening coefficients '''
import glob
import sys
import time
#-----------------------------------------------------------------------------------#
#-----------------------------------... |
1f27b697985c7417e6d8d978703175a415c6c57d | 7615da390fc03b766e1882d36e0e82cb85481c62 | /05 tocak_bicikla/tocak_bicikla.py | 939364dd42ac10f17088a65a6e0a1fa7a3410f35 | [] | no_license | JovanaOrmanovic/mlrB2019seminarski | dc0266404a10d24300838c88ed5dc666a7ebb816 | e4c09c3ef905fdecc59a6f5430d9e27fc7e7967a | refs/heads/master | 2020-06-04T23:37:07.229734 | 2019-08-16T21:13:56 | 2019-08-16T21:13:56 | 192,233,892 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | tocak_bicikla.py | import math
r = float(input())
p = int(input())
obim = 2 * r * math.pi
ukupanPut = p * obim
# centimetre pretvaramo u metre
ukupanPut = ukupanPut * 0.01
print("%.2f" % ukupanPut)
|
71a9c9b8f47dcfbecc154c44d5a72ddbd852145a | 0854e2035d3df4c3c122f9bf33a0e5d1f3a5ead9 | /funcoes.py | a38746a95fd4578ba3c4512824e86a03be71e7bc | [] | no_license | RhodrigoLopesPicinini/GameEducacional | faa5fd3c30c10c3bb02d1e257020925c62a3506e | cd2f149b79d5cf875c8ef5f7e99614005072fc5d | refs/heads/master | 2023-06-01T10:59:33.130999 | 2021-06-24T17:19:23 | 2021-06-24T17:19:23 | 378,468,604 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 194 | py | funcoes.py |
def randomizer(n, garrafa_vidro, lata_metal, copo_plastico, bola_papel, maça_organico):
lixos = [garrafa_vidro, lata_metal, copo_plastico, bola_papel, maça_organico]
return lixos[n]
|
02e711dfc122007c74949cd9f86e2aeb9d334871 | b58de03bf613dda2547f6b1ef1cf83f03a937f50 | /adaline/adaline.py | b3f9f8735f447511cad5b1a677069b95013c1bd4 | [
"MIT"
] | permissive | brenoalef/ICA | de4c0782b6956f1757492d2a31c3fe11270759c0 | 8593a1c53ba536538d99dafb9edfb64413088e24 | refs/heads/master | 2020-04-19T03:00:05.817887 | 2019-03-23T14:24:45 | 2019-03-23T14:24:45 | 167,921,626 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | adaline.py | import numpy as np
class Adaline:
def __init__(self, eta = 0.0001, n_iter = 2000):
self.eta = eta
self.n_iter = n_iter
self.error = []
def fit(self, X, Y):
X = np.hstack((np.ones((X.shape[0],1)), X))
self.w = np.random.uniform(-1, 1, (X.shape[1], 1))
for n in ... |
b283f447a9a8c06a6b33abd8fa5d9a7714c0eb5c | c479a8b2d1c72b22c095200abddf44099708c566 | /07_元素定位_name.py | b98523e64b4f2ec3260e6f824cda3c76c3e92525 | [] | no_license | tangziming/learn-selenium | 605ba59377cd1898c5f127498600490963eb5bcb | ca7e6d4d6962e396fdf67d682e74d15c49e2601d | refs/heads/master | 2022-09-23T20:43:06.210503 | 2020-06-03T08:58:53 | 2020-06-03T08:58:53 | 263,655,179 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 449 | py | 07_元素定位_name.py | """
1、学习目标
掌握name元素定位方法
2、操作步骤(语法)
driver.find_element_by_name("name的属性值")
"""
from selenium import webdriver
import time
driver = webdriver.Chrome()
url = "http://192.168.0.90/zfcapp/index.html#login"
driver.get(url)
time.sleep(2)
companyID = driver.find_element_by_name("企业ID")
print(companyID.get_attrib... |
ec5349928fe3194de59c79aa53048ad811c46b63 | b7550b83baa9294b14c6d884c31f31291f69d4d5 | /tests/test_osm.py | d2f204014140a65fa25057dfd140df1ba5081941 | [
"MIT"
] | permissive | opengeos/leafmap | 09ce8ad49a1b3be71cc320d8a29c6338967dc8b3 | 25734c25707d779602a864e9c0c17afc3cdb136a | refs/heads/master | 2023-08-31T01:26:59.338040 | 2023-08-29T01:01:20 | 2023-08-29T01:01:20 | 346,188,421 | 235 | 34 | MIT | 2023-09-14T21:06:46 | 2021-03-10T00:54:29 | Python | UTF-8 | Python | false | false | 1,347 | py | test_osm.py | #!/usr/bin/env python
"""Tests for `leafmap` package."""
import os
import unittest
import geopandas
from leafmap.osm import *
class TestOsm(unittest.TestCase):
"""Tests for `common` module."""
def setUp(self):
"""Set up test fixtures, if any."""
def tearDown(self):
"""Tear down test fi... |
0005215b288fc0de9810a51d4f02efde45bc638f | fd97aa56eead6e1c58bc46aaa58655ae888e8435 | /apps/apitest/migrations/0001_initial.py | ff98decf13dc1979866cf2c00759281d86001487 | [] | no_license | huanshenyi/api_test_backed | bdcb40c8bc69c493d1fb6732b16d2fcc95c343ac | 44653c4fdc81bce7eacd247d560912ba0a5c2b0a | refs/heads/master | 2022-11-02T23:48:49.616561 | 2020-06-21T11:38:40 | 2020-06-21T11:38:40 | 265,608,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,294 | py | 0001_initial.py | # Generated by Django 3.0.6 on 2020-05-17 09:14
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... |
2bb7507bc1e988e6c9f902c8eafc1cf43308855a | 392b3c3578f9de508dbcb27a9e28df55e5ebefef | /20210315_mappa.py | bd969e0b3ba6c61485d22fd970c88d4ae4fd338d | [] | no_license | fBaz92/Algoritmi_2021 | d25cbb5cc3e77aa1b423c8f01dc060ae4a067294 | a700e4b5e901d4fd491f378c26099cc66e59fde6 | refs/heads/master | 2023-04-22T14:14:05.579937 | 2021-05-01T19:27:19 | 2021-05-01T19:27:19 | 347,993,387 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,025 | py | 20210315_mappa.py | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 15 09:30:26 2021
@author: franc
"""
def routing_ostacoli(griglia, memo={}):
"""
Parameters
----------
griglia : list of lists
lista che contiene gli ostacoli e i permessi
*: permesso
x: ostacolo
memo : dictionary
... |
1bc06d9e83c5b87f39be568555eea3a762ca9fbc | 51ef21b9be12b30af69e194fd77fa4b7a7d5e045 | /Q1.py | fea0d7df6c3328436373f4a75255d705d9a21351 | [] | no_license | Bob-Arctor/wunder | fa8cd25043dee6e2652a7242761ebc618a4b83f6 | 1f820076689cc8b3348b2388a8c32ce5e86fa79c | refs/heads/master | 2021-01-12T09:18:32.498362 | 2016-12-19T02:40:12 | 2016-12-19T02:40:12 | 76,818,839 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,871 | py | Q1.py | import numpy as np
from operator import add
import itertools
np.set_printoptions(linewidth=200)
np.random.seed(42)
hickers = 9
costs = np.around(np.random.rand(hickers*2, hickers*2), decimals = 2)
np.fill_diagonal(costs, 0)
costs = np.maximum( costs, costs.transpose() )
home_costs = np.around(np.random.rand(hickers,... |
3c11b0537a4b6d401549b2779759584c8f398c77 | 15878bedfcfa63a341a5880b47e5e6bf2d586c7f | /smartshark/hpchandler.py | 8416afa192edc6aaaa6517472465b90ae314a06f | [
"Apache-2.0"
] | permissive | Twalord/serverSHARK | 3b76cb95064bb6e8b9ff10613e01438503fca0c6 | 21a191f45c43fbba82f2dde9bd2a739e8da76fcd | refs/heads/master | 2020-03-24T04:35:04.745914 | 2018-11-26T10:48:02 | 2018-11-26T10:48:02 | 134,568,481 | 0 | 0 | null | 2018-05-23T12:46:45 | 2018-05-23T12:46:45 | null | UTF-8 | Python | false | false | 14,401 | py | hpchandler.py | import os
import paramiko
from server import settings
from server.settings import HPC
from server.settings import DATABASES
from smartshark.models import PluginExecution, Job
from smartshark.shellhandler import ShellHandler
from .scp import SCPClient
import string
import uuid
import logging
import re
import sys
clas... |
1ee99014a59f9de1635b4de04a9f99109dac5263 | a935ec8dab61675b6a3e348511fb9f8c5d490026 | /python/audioflux/dsp/czt.py | 07b8074b6881de4ae99942a82b75c4b01dfaacb8 | [
"MIT"
] | permissive | libAudioFlux/audioFlux | d604c54941c17d90e1ef42f04ba353ef6e244926 | 3ae59434e2c1cacb6da43562677ed4899d7047c7 | refs/heads/master | 2023-04-28T05:17:22.649299 | 2023-04-25T09:45:59 | 2023-04-25T09:45:59 | 589,514,195 | 1,701 | 85 | MIT | 2023-04-25T09:00:05 | 2023-01-16T09:53:04 | C | UTF-8 | Python | false | false | 3,592 | py | czt.py | import numpy as np
from ctypes import Structure, POINTER, pointer, c_int, c_float, c_void_p
from audioflux.base import Base
from audioflux.utils import check_audio, format_channel, revoke_channel
__all__ = ["CZT"]
class OpaqueCZT(Structure):
_fields_ = []
class CZT(Base):
"""
Chirp Z-transform (CZT)
... |
32198bbc13530b76d7e3ad0da8f9b4b1c90dbc9f | 4a7f2a2f9a523d216dfe36060e467232e6ded5ef | /furs.py | 876683db997b15a39c96739abf12928d47876959 | [] | no_license | TimonNajdovski/Analiza-Furryjev | 3ca7b2a1ea2144a5363f98bdce95905f37f854c7 | f22337793d2a5b954a258b11f11571a284951bbb | refs/heads/main | 2023-03-06T11:43:25.464337 | 2021-02-10T17:57:03 | 2021-02-10T17:57:03 | 306,154,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,125 | py | furs.py | import csv
import os
import requests
import re
main_directory = 'D:\Faks\Projektna_analiza_podatkov'
fursuit_directory = 'D:\Faks\Projektna_analiza_podatkov\Fursuits'
owner_directory = 'D:\Faks\Projektna_analiza_podatkov\Owo-ners'
main_filename = 'rawr_data.html'
csv_filename ='furs_podatki'
def get_page_initial(dire... |
00d7a1bd5332fd7d3b43d1de2518a6430f5263a8 | 66c5551e053b7bfaff13e355fd290068b00c432d | /train.py | 4e64c321ce3953e91b9e330e7c3a374433a67e6a | [] | no_license | mehuljain1104/AutomaticTextGenerator | 8bd88835d8c563c54e7216efc744f816fb298f1e | e4c9031544cb81cb4575d627ea7d06b48c1ca3be | refs/heads/master | 2021-04-06T00:16:22.980372 | 2018-03-22T17:03:57 | 2018-03-22T17:03:57 | 124,778,569 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,596 | py | train.py | import numpy as np
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Dropout
from keras.layers import LSTM
from keras.callbacks import ModelCheckpoint
from keras.utils import np_utils
filename = "shaky.txt"
raw_text = open(filename).read()
raw_text = raw_text.lower()
chars... |
9d57ff575b791031299fc71bd53687f3895f34e6 | 68cbef30a9665ae2b3b07e803b2f84ed191d62b1 | /lib/email.py | 385c197d654c1b8fa059e0d5bee9c51c1c25c1fa | [] | no_license | katdom13/flask-blog | 8b1a29061e4d377217015bb3c00767bef2f37380 | a78101fd95c15015e5a4a7dc61f060f0dc6e43b7 | refs/heads/master | 2022-07-18T15:57:24.454594 | 2020-05-20T03:52:20 | 2020-05-20T03:52:20 | 265,092,604 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,633 | py | email.py | import smtplib
from os.path import basename
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
class EmailServer:
def __init__(self, domain='localhost', port=1025, email=None, password=None):
self.domain = domain
se... |
3e704e226c4696a485d0f23eec15c5e23c3bd245 | 21293b902af4d3d1f2258d70c5581a05ed4a5745 | /ECHO/__init__.py | 3f051842562333e8f1e052e4e8badfbdbbcd745c | [] | no_license | dannyjacobs/ECHO | cce9547392c8a2a2b0b67695f4778fb4e7380478 | efb8b401ecf90e2d6e92e3704dd9ca46cc06e679 | refs/heads/master | 2023-08-20T21:46:06.442643 | 2023-08-04T17:16:43 | 2023-08-04T17:16:43 | 45,145,865 | 1 | 3 | null | 2023-05-19T20:46:29 | 2015-10-28T22:34:27 | Jupyter Notebook | UTF-8 | Python | false | false | 205 | py | __init__.py | from __future__ import absolute_import
from . import read_utils
from . import plot_utils
from . import position_utils
from . import time_utils
from .observations import Observation
from .beams import Beam
|
3e840b1a09b437758e6180925b85cfb8e5d311dc | a318ff21e5688b31746822ab87e492cacabbbc33 | /PytestModules/conftest.py | df8e91f8e3302e7fc5f61a580b4094283f73c83a | [] | no_license | vaitheeshwaran/Selenium_Exercise | 5302db5ac40def815eca26c2d7811847f49c1295 | 4b22d807a162dafacfde72ad8b8661b78fa6143e | refs/heads/master | 2022-11-18T04:19:16.915194 | 2020-07-20T15:26:26 | 2020-07-20T15:26:26 | 277,124,763 | 1 | 0 | null | 2020-07-05T13:08:27 | 2020-07-04T14:24:10 | Python | UTF-8 | Python | false | false | 1,478 | py | conftest.py | import pytest
"""
file name should start with test
test method name should start with test
py.test test_mod.py # run tests in module
py.test somepath # run all tests below somepath
py.test test_module.py::test_method # only run test_method in test_module
-s to print statements
-v verbose
"""
# Decorator Afte... |
e12e0ac360cf921fb01c60816d085a1991a3791f | d35ee3e4254d6368a4bec62afa1e1ec6ec33fdbf | /box/copy/__init__.py | 193c187c54a0820f9f79d6a431fd37f111393a76 | [
"MIT"
] | permissive | salexkidd/box | 73da1939f0c65f854857edd151cc0f4ebaf3f1e6 | 39a3d7968b3740fc07b5fefbc69930cc53cdc935 | refs/heads/master | 2021-01-23T08:43:59.977401 | 2014-09-30T17:48:31 | 2014-09-30T17:48:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 32 | py | __init__.py | from .copy import enhanced_copy
|
c38cc3b37b7112a3c5b220bca9bb8ebd22ba572d | ce96a6892fe2d2a9a0aeccb5c7204a0e97f3cecd | /myntra/more_faulty_links_for_test_and_train.py | fd8bc12eb032068300e5d158f86f78fd21fdfa63 | [] | no_license | samanthreddy007/Hackerearth | 1d7ded7585b4f1c602ae9013d88907373a1f509e | b91c50f88d38ea4f1c1a00cd67041532cbc2e719 | refs/heads/master | 2020-03-15T21:33:55.014696 | 2018-09-11T15:25:22 | 2018-09-11T15:25:22 | 132,357,395 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,333 | py | more_faulty_links_for_test_and_train.py | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 18 20:25:54 2018
@author: Karra's
"""
import os
from IPython.display import clear_output
import pandas as pd # For manipulating CSV files
import urllib.request # For downloading files from the provided links
import time
from termcolor import colored
import... |
896c69864172ff9b45ebe213074726d05a613614 | f9543430dcc42e6349882e2d8ee469aad216f0f7 | /models/dynamo.py | 5cab46973cc740ad3493f5566c949522f4116551 | [
"MIT"
] | permissive | peacemaker07/iot_making_for_sls | fe43564c2d142d7d09820bb807e00ef8867bfaca | bcf42737f9b9fd50afebf91a791b7cb5ed91e177 | refs/heads/master | 2023-05-27T11:43:08.429462 | 2022-08-21T01:56:12 | 2022-08-21T01:56:12 | 200,330,750 | 1 | 0 | MIT | 2023-05-22T22:29:18 | 2019-08-03T04:19:47 | Python | UTF-8 | Python | false | false | 1,853 | py | dynamo.py | import boto3
import json
from boto3.dynamodb.types import TypeDeserializer
from utils.helper import DecimalEncoder, get_env
deserializer = TypeDeserializer()
class BaseDynamo:
table_name = None
dynamodb = None
table = None
def __init__(self, region_name='ap-northeast-1'):
self.dynamodb =... |
00d91d0495a71069e2ec9f482d1d49d255f5b496 | 00ec33d97a4526cd749a4136ce72c3ed7076a136 | /models/room.py | 32595282d2b078bd2b892bde13d58cb9950d1784 | [] | no_license | xuewenyu123/xuewenyu123 | d226f637318d2d81129de7e2c8a99d2189a7d0c2 | 2f93798bd45da8df58adeb2ad78fb0019c77d929 | refs/heads/main | 2023-04-01T13:18:21.858207 | 2021-03-16T08:52:00 | 2021-03-16T08:52:00 | 348,271,845 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 768 | py | room.py | from django.db import models
from .base import BaseModel
class RoomInfo(BaseModel):
""" 房间信息 """
rno = models.IntegerField(default=101, null=False)
style = models.CharField(max_length=60, verbose_name='房间类型')
dsc = models.CharField(max_length=255, default='', verbose_name='简介')
price = mo... |
5b0ed4a358d08217da647a5be433e965542a2b8d | a9897b3e2d7d317a1f1a1953f67297e794e310dd | /detector.py | d1f5deb7c30fad63788365df2a981629df965f27 | [] | no_license | mfkiwl/toyslam | 77c0e1b5e0ffafb539e6e5d88da4b9a1bd35b799 | e88beff82825d86342338ee1cc0a9708f2838b71 | refs/heads/main | 2023-07-07T18:23:42.363984 | 2021-09-04T06:21:09 | 2021-09-04T06:21:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,654 | py | detector.py | import numpy as np
import cv2
# Initiate ORB detector
class DetectFeatures(object):
def __init__(self, chosen_detector=cv2.ORB_create(5000)):
self._detector = chosen_detector
self.prev = None
#TODO: Make detections window prettier!
def detect(self, img):
# find the keypoints and descriptors with chose... |
8985283bec262c50a82006f72f121ad1d75651ef | 6e2e476c5764d5e75c7afe5a531ac5b890ef0c64 | /Models_plotGeneralizationScoreDependingOnLearningCyclesWithLearningStrategies_VaryingModelErrorMargin.py | da2efa2d742fc64bd8d7cfe7ed4aa908bb78c867 | [] | no_license | BrunoDatoMeneses/PythonPloting | d4611f62f2709465e32d3ab2dc4e0d5cef65e783 | b5bd1c7aa5a50144d2db82f29ab754b01084f230 | refs/heads/master | 2023-05-07T14:08:17.225336 | 2021-06-02T09:06:13 | 2021-06-02T09:06:13 | 297,996,150 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,506 | py | Models_plotGeneralizationScoreDependingOnLearningCyclesWithLearningStrategies_VaryingModelErrorMargin.py | import _PLOT
from Utils import transpose
import os
import csv
# transpose.transposeFiles()
from _PARAMS import PARAMETERS
figEndName = "-AllNCS"
xlabel = 'Learning Cycles (#)'
ylabel = 'Generalization Score (%)'
figVaryingParamString = "errorMargin"
varyingParamStringValues = ["0.5","1.0","1.5"]
varyingParamString... |
eed0e4ee86e65cd81a23af14bf83e5f892e5ec83 | f1d18ce5bbeb91dfa4bceb7aa5a571b2064f1901 | /sam3.py | 2394b3848f40a7524f5d0bd66c21a2bca26f06bc | [] | no_license | gopalakrishnanngk/gopal | 66f3bcfd6dab6b2f888749286dec82e04f9131b4 | 057998e43ad4072edf45ff62040c0bdf12d48e5b | refs/heads/master | 2021-09-25T01:54:45.692713 | 2018-10-16T17:27:00 | 2018-10-16T17:27:00 | 114,449,011 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | sam3.py | y=['a','e','i','o','u']
x=raw_input()
if x in y:
print ("x is vovel")
else:
print ("x is not vovel") |
abea980c96eb5501aef0cf7a8f246694fb801a88 | cf8319fec0538d7e0ae627ddc0ec81a1462dc6a2 | /code/567.Permutation-in-String-v2.py | 9ae517de2f2f375960bf623d0559376465d9bd45 | [
"MIT"
] | permissive | Aden-Q/LeetCode | b64221760c03406fcfd078f14f8751de8a2d5d6f | c80dbb9f0d09cdde72e01a09fb44a512d3b7c30e | refs/heads/master | 2022-12-09T17:40:06.546583 | 2022-12-07T03:59:44 | 2022-12-07T03:59:44 | 210,083,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 590 | py | 567.Permutation-in-String-v2.py | from collections import Counter
class Solution:
def checkInclusion(self, s1: str, s2: str) -> bool:
needed = Counter(s1)
window = Counter()
left = 0
right = 0
sz = len(s2)
while right < sz:
r_char = s2[right]
right += 1
window[r_ch... |
c12eeb98d183a1cf7bdcd18c1c8d1d230c47778e | 41fd80f9ccc72a17c2db16b7019312a87d3181e8 | /zhang_local/pdep/network1483_1.py | f5950c5b13e7e7405b7dafd75f6a558f2c491af0 | [] | no_license | aberdeendinius/n-heptane | 1510e6704d87283043357aec36317fdb4a2a0c34 | 1806622607f74495477ef3fd772908d94cff04d9 | refs/heads/master | 2020-05-26T02:06:49.084015 | 2019-07-01T15:12:44 | 2019-07-01T15:12:44 | 188,069,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 41,336 | py | network1483_1.py | species(
label = '[CH]=CO[CH]C(5178)',
structure = SMILES('[CH]=CO[CH]C'),
E0 = (255.517,'kJ/mol'),
modes = [
HarmonicOscillator(frequencies=([3120,650,792.5,1650,2750,2800,2850,1350,1500,750,1050,1375,1000,3010,987.5,1337.5,450,1655,3025,407.5,1350,352.5,180,180],'cm^-1')),
HinderedRoto... |
388e77f74689c15e45a06b56be1c368d8dafdc21 | c6d44f67d387f0c1cf7f1949d86afe48f2804140 | /lib/handlers/autolink/abstract.py | 15df2db7157d743cb862203af3e4bedcedc85867 | [] | no_license | maprox/pipe | 57a2c789e073a240825bcc22e57045828ad0535c | 4a4bc730252ece695b2773388812e2d59d4947ce | refs/heads/master | 2021-12-01T19:40:51.505544 | 2021-11-09T08:41:59 | 2021-11-09T08:41:59 | 2,841,574 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,565 | py | abstract.py | # -*- coding: utf8 -*-
"""
@project Maprox <http://www.maprox.net>
@info Autolink base class for other Autolink firmware
@copyright 2012-2013, Maprox LLC
"""
from struct import pack
from kernel.logger import log
from lib.handler import AbstractHandler
import lib.handlers.autolink.packets as packets
import lib.... |
ca957bacb65017559312a2d38e317bdd16dce36a | f98168326e8ac579620b26f11dd17fbb7c58288c | /demo.py | 249bfe56229cbf51bd035044b78533df0bed6867 | [] | no_license | devops-training202101/gitdemo | e5535d2af618ee6685c27a1daafc79a5e3248e1a | eea9f75c9e57c43c45afee5c32a66b42aea33160 | refs/heads/master | 2023-02-22T08:42:13.418809 | 2021-01-27T05:53:57 | 2021-01-27T05:53:57 | 333,327,253 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 27 | py | demo.py |
print('DevOps)
print('2')
|
ebdca9b87633c9f52606a676003bea9f1c32b5a2 | 6f0e74cdc81f78ffc5dbc1b2db1cef8cbec950c4 | /aws_interface/dashboard/views/app/database.py | 134f1ebbeb0415d8eaa52f380b81547da1f0716a | [
"Apache-2.0"
] | permissive | hubaimaster/aws-interface | 125b3a362582b004a16ccd5743d7bdff69777db5 | 5823a4b45ffb3f7b59567057855ef7b5c4c4308d | refs/heads/master | 2023-01-19T15:43:38.352149 | 2023-01-12T01:38:00 | 2023-01-12T01:38:00 | 149,847,881 | 57 | 10 | Apache-2.0 | 2023-01-12T01:39:49 | 2018-09-22T05:17:43 | JavaScript | UTF-8 | Python | false | false | 6,846 | py | database.py | from django.shortcuts import render, redirect
from django.views.generic import View
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import JsonResponse
from core.adapter.django import DjangoAdapter
from dashboard.views.utils import Util, page_manage
from decimal import Decimal
import json
... |
7f9813abbffed3e2b161f317c0a935292de167a9 | 90696cd77b05cfb3fd786b99dd2597dee2b116b5 | /PasswordMeter/app/requeriments/additions/numbers.py | cf1dc06da54ed622c1e0e9dea94449706e97c78d | [] | no_license | DouglasRonchi/HBSISPythonPadawan | 3773c9a918c3caf9a7f03cb8bf9b3ab8b46faff6 | dfa6c8d528f64f9953f7e9070511f28a579b7b45 | refs/heads/master | 2021-07-04T10:09:09.613183 | 2020-01-18T13:58:40 | 2020-01-18T13:58:40 | 229,998,945 | 2 | 2 | null | 2021-04-20T21:00:23 | 2019-12-24T20:12:12 | Python | UTF-8 | Python | false | false | 417 | py | numbers.py | from app.password.password import Password
from app.requeriments.additions.additions import Additions
import re
class Numbers(Additions):
def __init__(self, password: Password):
super().__init__(password)
def _get_number_of_numbers_on_password(self):
contador = 0
lista = re.findall('\... |
32cea01d76f09055f89d0a268e299c8fece1300c | d69bbb3c64f5a725e567fe7dba0d0b172c845d1e | /myvenv/lib/python3.6/locale.py | 6ab491d3464161c698dd13ad0f4b90251bf12b01 | [] | no_license | PriscillaRoy/Audio-To-Text | 39b0975e364dfec2f838463c326be52339b1c906 | 9366910a86d882e8e9c4403ad6e7bdeb949775c7 | refs/heads/master | 2020-03-31T01:45:30.128104 | 2018-10-06T16:18:07 | 2018-10-06T16:18:07 | 151,793,884 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 50 | py | locale.py | /Users/priscilla/anaconda3/lib/python3.6/locale.py |
151227d594e4a971e4a3cab4b31e7609a35d03ff | 9c2f30edbeb64b387cc7becff5b6f879eb72fdfe | /w3bsite/classes/firebase/__init__.py | 2d687b169c097375ace2e96e9c0255a1ce16839b | [] | no_license | vandenberghinc/w3bsite | d55119f4e6b5ed440383b767720c05ba367441a8 | 575dc42a75b24f6c48d7788dd80a61b53cde3ea6 | refs/heads/master | 2023-07-23T09:19:15.721674 | 2021-08-31T09:57:18 | 2021-08-31T09:57:18 | 340,360,524 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,969 | py | __init__.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# imports.
from w3bsite.classes.config import *
from w3bsite.classes import utils
from w3bsite.classes import defaults as _defaults_
# pip imports.
from django.contrib.auth import authenticate, login
import firebase_admin
from firebase_admin import credentials, auth, fir... |
1eabff43f1f72ff25032bedea35186fc37dfe2d7 | 56a780aab459dd51bf5b91bf24a82c91a3b235da | /src/sensu_go/resources/v1.py | e1db5b4745840189399943ad26a476cd6805a5a6 | [
"MIT"
] | permissive | isabella232/sensu-go-python | 8fe009eb2336d5eaa35e0abcb8a06db8619638f5 | b225559646f0b6dcc20056c83e243a64c7d40b5c | refs/heads/main | 2023-05-19T17:19:33.288163 | 2021-06-12T10:54:27 | 2021-06-12T10:57:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | v1.py | # Copyright (c) 2020 XLAB Steampunk
from sensu_go.typing import JSONItem
class V1Mixin:
@staticmethod
def api_to_native(data: JSONItem, type: str) -> JSONItem:
return {k: data[k] for k in ("type", "metadata", "spec")}
@staticmethod
def native_to_api(
spec: JSONItem, metadata: JSONIte... |
18a4e6a7f4b0c666aa2e0f782afb22413f333d53 | 6917c1494e74115c432f9af450d0456036309179 | /clean_downloads.py | 04c99098a46177b208b8aaea8db60a0ae87e3573 | [] | no_license | EricLeer/cleanDownloads | d6f88f7d0babbd1aca20db8e2805ba9b96e89604 | 126291156b8fbe71217b62bb76871e6fbb9e90d0 | refs/heads/master | 2021-01-20T09:37:49.080579 | 2017-05-05T08:25:43 | 2017-05-05T08:25:43 | 90,273,492 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 789 | py | clean_downloads.py | from os import listdir, path, remove
import datetime
import shutil
def cleanup(folder,cutoffdays, removeFiles):
filenames = listdir(folder)
for file in filenames:
filePath = folder + "\\" + file
fileTime = datetime.datetime.fromtimestamp(path.getmtime(filePath))
now = datetime.datetime.... |
90b9dd2325a71cec6b33bad74729c4f3e84ce86a | 4cc6fe77d800dd2439e7a27327acb1d70366f7da | /pycomm3/clx.py | 4071bbab563534bbb753b9d308ea1e41989eaa0c | [
"MIT"
] | permissive | Mars-Cheng/pycomm3 | e41a31d49cb2ff64f48bd4dc2955e7d37d202a44 | 4e44848a29086c9001d88550e05ba95ba336765e | refs/heads/master | 2022-05-26T15:52:23.353608 | 2020-04-23T15:23:35 | 2020-04-23T15:23:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 60,768 | py | clx.py | # -*- coding: utf-8 -*-
#
# const.py - A set of structures and constants used to implement the Ethernet/IP protocol
#
# Copyright (c) 2019 Ian Ottoway <ian@ottoway.dev>
# Copyright (c) 2014 Agostino Ruscito <ruscito@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this so... |
1d4339a1eb1a9d913353517ee701432e7cc42897 | a60bf4ec6da1dc6226634a74532b3c0967cab4ae | /core/logger.py | a83bbcff27ac1f9816be723bcba7d93eba309205 | [] | no_license | codecyou/finance | 0f12b4476d3438ca1890ceee4770a42030eb2014 | 5103527fa98776878145bf09e70db454a6c764db | refs/heads/main | 2023-06-26T13:03:15.492252 | 2021-07-15T01:14:41 | 2021-07-15T01:14:41 | 339,940,830 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 882 | py | logger.py | import logging
from conf import settings
# 第一步,创建一个logger
logger = logging.getLogger()
logger.setLevel(logging.INFO) # Log等级总开关
# 第二步,创建一个handler,用于写入日志文件
logfile = settings.LOG_PATH
fh = logging.FileHandler(logfile, mode='a') # open的打开模式这里可以进行参考
fh.setLevel(logging.INFO) # 输出到file的log等级的开关
# 第三步,再创建一... |
eb16fee3e97d779399f0c28258ea47cc910aad05 | 0bd4d99564a0d2452516edbbb00544dd4be9f737 | /prices/settings.py | fa5189f832d46e761a72350a784bc58fde394964 | [] | no_license | hqiqi/HLT | 02207cb3abff96c9288fd2b7243f51b9f7a6dab6 | e840f9b25bb12eb81f55c875b0afac83aaee7fac | refs/heads/master | 2021-01-21T01:43:56.843089 | 2018-12-06T03:41:17 | 2018-12-06T03:41:17 | 64,842,991 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 268 | py | settings.py | # CELERY STUFF
BROKER_URL = 'amqp://guest:guest@localhost:5672//'
CELERY_RESULT_BACKEND = 'amqp://guest:guest@localhost:5672//'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = 'UTC' |
ff5d02b45313de30d9451c93a1cd866f20a3d33a | f0b6a859cfad9e1882ead65da7ec320781ba369f | /Water/OPC4/T265/analysis/Diffusion/bootstrap_Diffusion.py | b4153c4b3d24984cdc0e8e36aba6f78ce5cca100 | [] | no_license | drobinsonbrown/ODNP_Stats | 222cb01dca1b69bb356bf31e3123dec9d4e68b87 | cb3f721fd9e91da57b3f066fbbebbefd949e94aa | refs/heads/master | 2022-09-26T10:51:58.664215 | 2020-06-02T02:25:49 | 2020-06-02T02:25:49 | 268,674,047 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,520 | py | bootstrap_Diffusion.py | import numpy as np
import sys, os
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
import glob
### model to fit the ACF to
def fitfunc(t,m,b):
return m*t+b
### bootstrapping function
def bootsTransport(nsamp,nresamp,time,rmsds):
index = 0
meanRMSD = np.zeros((nresamp,len(time)))
m... |
6a075843c00cc2e9753e8f228db9ab4bb374f3f7 | f3c00a175bc0433712bb7459b8afc2f1c48d01fd | /app/api/utils.py | 60fdc04b56b6a5fe522e17fa3418cf75008e6cd8 | [] | no_license | granitelemental/vk_group_stat | e18f5d620b567506b05eab9142bef6dae5afb1e5 | 4fa442585c1545cbf10854fdde97684ddafcfa51 | refs/heads/master | 2022-06-30T20:25:01.335964 | 2020-06-03T16:10:54 | 2020-06-03T16:10:54 | 240,729,510 | 0 | 0 | null | 2022-06-22T01:46:55 | 2020-02-15T14:45:03 | Python | UTF-8 | Python | false | false | 1,156 | py | utils.py | import traceback
from functools import wraps
from flask import jsonify, request
import jwt
from app.api.errors import *
def try_except(fn):
def wrapped(*args, **kwargs):
try:
return fn(*args, **kwargs)
except Exception as e:
print(e)
return wrapped
def res... |
f0b7c3c01e98708f437778e6b52d66a294e5e60d | b81507e04db78d87fcab003ba71c7f981ad169d6 | /stats/anderson_darling.py | b933ade9103189e625081a8eea54d37d8f47e0d3 | [
"BSD-3-Clause"
] | permissive | bbw7561135/eblstud | 36eb11c1479fcb8d9987c96348b87e6d48c9c9f9 | 8dd53d92e77189493cd33bd02fd801c551046656 | refs/heads/master | 2021-06-14T20:47:59.747335 | 2017-03-24T00:04:22 | 2017-03-24T00:04:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 624 | py | anderson_darling.py | """
Anderson-Darling Test for normality
"""
import numpy as np
from scipy.stats import norm
def And_Darl_Stat(x):
"""
Return Anderson Darling Test Statistic A^2
Mean and variance are unknown
See http://en.wikipedia.org/wiki/Anderson%E2%80%93Darling_test
"""
cdf = norm.cdf
x = np.array(x)
... |
9274a24d2b37b5afc828d4fb6a63979209d7e44d | dc9f00c318395714b1cfb8a8fc7da8296d331854 | /cleanall.py | d68683839c3b65b7e6292716687d0a4e32609da8 | [] | no_license | SteveStrong/vault-search-api | 3779d101b7570b90f07005af5af4dfe258964594 | 1910dc6253a8af64f5d6b8bd8d550e51891bb41f | refs/heads/main | 2023-02-11T05:53:19.305883 | 2021-01-06T01:00:37 | 2021-01-06T01:00:37 | 326,275,351 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 871 | py | cleanall.py | # Imports of import.
import json
import os
from datetime import datetime
from elastic_search_wrapper import ElasticSearchWrapper
# https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html
# https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
def elasticsearch_clean()... |
48c21a15f9a1f199a9428d26a9a9429bc1f484bf | 7818463269b8717563a6c796d00369cac3d371c9 | /lab2/myclasses/lab2_task3/vector.py | bc7f05bba0579b39bb09eb208bdbd958e6abcebe | [
"MIT"
] | permissive | kinpa200296/python_labs | ad98c81d614eb01ce443b88a97176f1a846fedd8 | bb26c426cbe9bb27f45b8ee4c974c38db300468f | refs/heads/master | 2021-01-10T08:24:57.731802 | 2015-11-27T14:03:24 | 2015-11-27T14:03:24 | 46,214,275 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,736 | py | vector.py | #!/usr/bin/env python
from numbers import Number
from math import sqrt
__author__ = 'kinpa200296'
class Vector(object):
def __init__(self, *args):
if len(args) == 1 and isinstance(args[0], list):
data = args[0]
else:
data = args
if any([not isinstance(value, Numb... |
65262edcf7d157182a19ad2b455ae503de446230 | 0d8ee78f61660343e5feec41a53269dbf5585fa3 | /Demo29/kernel_function.py | f51b7c575a80cccbaad2ade1a6adeca6bbf558d2 | [] | no_license | x-jeff/Python_Code_Demo | 41b033f089fa19d8c63b2f26bf66ef379738c4ad | 9bc458b08cfae0092e8f11a54031ca2e7017affc | refs/heads/master | 2023-07-29T16:34:34.222620 | 2023-07-09T10:38:23 | 2023-07-09T10:38:23 | 176,306,727 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 975 | py | kernel_function.py | from itertools import product
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import load_iris
from sklearn.svm import SVC
iris = load_iris()
X = iris.data[:, [2, 3]]
y = iris.target
clf1 = SVC(kernel="rbf") # 非线性kernel
clf1.fit(X, y)
clf2 = SVC(kernel="poly") # 非线性kernel
clf2.fit(X, y)
... |
fdc93a4330a659fcaa96d2c04735dfaa596649b9 | 8693e875198162c2f7cf68266f33eaa7c030f295 | /django_common_utils/libraries/handlers/optimizers/text.py | 87a429081d94b31eed2b8816b5aa033c2458ee4c | [
"MIT"
] | permissive | Myzel394/django-common-utils | c64d94ecb6f5952584d6c8b509b2932795cc8581 | 038bc4481bd44d67545ce307170f530a464f678b | refs/heads/master | 2023-03-14T18:03:37.015062 | 2021-03-09T12:10:07 | 2021-03-09T12:10:07 | 281,906,464 | 2 | 1 | MIT | 2021-03-09T12:10:08 | 2020-07-23T09:17:46 | Python | UTF-8 | Python | false | false | 1,249 | py | text.py | import re
from ..constants import TextOptimizerDefault
__all__ = [
"TextOptimizer"
]
class TextOptimizer:
"""
Optimizes a given string. Accepts text/plain.
"""
@staticmethod
def remove_redundant_space(
text: str,
no_space_after: str = TextOptimizerDefault.no_spac... |
f6e9cb0a314a42143d2cfae98447bfce9cbd56ae | d2991d763939ede4c3744c4c3dc17a16ecb1fd7f | /Raymond/raymondServer.py | 9f9f091df46cd5056f9055066c06d34f90b4223d | [] | no_license | CurtisDai/DAPro | cebaa8c37689e001bd9035ef382f71262720b298 | 911bcdd53bc4c44e58c975ac5a06af9645c0223f | refs/heads/master | 2020-05-03T20:43:13.138123 | 2019-05-17T07:22:41 | 2019-05-17T07:22:41 | 178,809,080 | 0 | 2 | null | 2019-04-27T03:21:23 | 2019-04-01T07:29:59 | Python | UTF-8 | Python | false | false | 4,670 | py | raymondServer.py | import json
import socket
import random
import threading
import tkinter as tk
import UI
import time
import sys
class ThreadClient():
def __init__(self, window):
self.window = window
self.gui = UI.UI(self.window, "Raymond Mutual Exclusion Stimulator", True)
self.gui.add_node("cs")
s... |
cd76f5461c41594843e8e37630480bac956c8974 | 01f84f14a680c1a0bd002cf03dda1d60edc7cacd | /trac2github_issues.py | 97afdc20131cdb2b45b99336435711f5e99131e7 | [] | no_license | atiti/trac2github | 7ad09aee08851d36da4561faaf68c3d51a90d1f0 | 981ad1c92ce314f965c6b6d4c70b4ec4ff061b02 | refs/heads/master | 2016-09-05T16:47:42.163722 | 2013-03-11T14:59:51 | 2013-03-11T14:59:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,984 | py | trac2github_issues.py | #!/usr/bin/env python
DBFILE = 'mobius.db'
CREDENTIALS_FILE = '.creds'
GITHUBURL = "https://api.github.com"
TO_USER = 'atiti'
TO_PROJECT = 'testproject'
CHECKPOINT_FILE = '.chkpoint'
DEBUG = 1
from getpass import getuser, getpass
import github3
import sqlite3, sys, string, time
import requests, json
from random impor... |
220ea8218f9aca770d117ccafded2f5767e45ffd | 09377dfc926009cb362b4c941d76efa7792baead | /landing/migrations/0005_auto_20190317_1634.py | 970d842b30cc0a55dceaa421ab32517779f4a69f | [] | no_license | amarantesmind/Serena | eceea21a68b68ff6038085f359d5d39988b8cb95 | cac7cfb509101ffb2ebfce24a14c2b46b8a2c979 | refs/heads/master | 2020-05-02T14:44:53.160804 | 2019-03-20T00:03:57 | 2019-03-20T00:03:57 | 178,019,604 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,357 | py | 0005_auto_20190317_1634.py | # Generated by Django 2.1.7 on 2019-03-17 19:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('landing', '0004_auto_20190317_1503'),
]
operations = [
migrations.AlterField(
model_name='cadastro',
name='celular',... |
0db9805b35ebd75597f1be876fe16102348a0fa8 | 9f3d211258cfe6bb5ce97eb3eccc5f953349b281 | /audioshift.py | 3804e5286afc386c6155abd5b7276ae456343eda | [] | no_license | sw8f17/app_testing | 92f5471380ecb511bd4f1c0106dbcb834d06f7f8 | bfe3c6e3547a0dab4c185fe884566057f4353811 | refs/heads/master | 2021-01-22T07:04:15.624980 | 2017-05-11T09:43:20 | 2017-06-19T09:25:17 | 81,804,047 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,675 | py | audioshift.py | from scipy.io import wavfile
import numpy as np
from numpy.fft import fft, ifft, fftshift
import begin
from itertools import combinations
from glob import glob
import os.path
from matplotlib import pyplot as plt
import sounddevice as sd
def _cross_correlation_using_fft(x, y):
"""
Make cross correlation betwee... |
9d2a1b19a5b33c3220cc8b069a7185a62c13ddbe | d918c530015fe4c204469a5c2dd6e69f4e7c0102 | /code/attention.py | 14e33c4dceff84b2705cf4bb9e13737b8dfdef43 | [] | no_license | lhfuestc/Dr.Sure | fa1d9399d181017c88972452190d0fa2c6e4123c | 6bb9eef5612bfaf1999d7fb5e43e40769f409a21 | refs/heads/master | 2023-01-05T19:50:54.974532 | 2020-11-02T02:05:43 | 2020-11-02T02:05:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,221 | py | attention.py | # -*- coding: UTF-8 -*-
# Authorized by Vlon Jang
# Created on 2017-09-26
# Blog: www.wangqingbaidu.cn
# Email: wangqingbaidu@gmail.com
# ©2015-2017 All Rights Reserved.
#
"""
Attention Model:
WARNING: Use BatchNorm layer otherwise no accuracy gain.
Lower layer with SpatialAttention, high layer with Chann... |
694fa393b4c4d6462e1c329fe7477b72236b7715 | 3ecc4102b73707eca8098af0d962c3daa407ea9c | /agazeta/agazeta/settings.py | 99c56316769cc25b804c529516ee38bc1568a9c9 | [
"MIT"
] | permissive | Scoppio/a-gazeta-de-geringontzan | ec4506c6780836d06aeb5dedba8ad1626cf434fc | 7166f8f453d578cc3b249c5305d12fc36e95d38a | refs/heads/master | 2020-06-13T22:25:55.955295 | 2017-01-05T18:34:09 | 2017-01-05T18:34:09 | 75,547,045 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,920 | py | settings.py | import os
from unipath import Path
from decouple import config
from dj_database_url import parse as db_url
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
SECRET_KEY = config('SECRET_KEY')
DEBUG = config('DEBUG', default=False, cast=boo... |
20ea54b9807e934eb863f057c180d63a534f51ee | 644c4150fbc48e1a742227cff55b8c33eef94e64 | /inv_index.py | 2de78243585914eab88cb404c2f3d5c3cda90742 | [] | no_license | MicheleMorelli/inverted_index_test | 30bcc92ab18a8111eed42fe1180d87e4b5647b49 | be00015e99d8841fb307c66338b9355a41db69ae | refs/heads/master | 2020-04-06T12:41:24.822726 | 2018-11-14T00:50:57 | 2018-11-14T00:50:57 | 157,466,061 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 770 | py | inv_index.py | def retrieve(d):
print_d(d)
print("INVERTED INDEX:")
b = inv_index(d)
print_inv_d(b)
def inv_index(d):
idx = {}
for k,v in d.items():
for element in v:
idx[element] = idx.get(element, []) + [k]
return idx
def intersect(d):
pass
def print_d(d):
for k,v in d.item... |
091e6ae7778238a22f4301dc0d334e6985086357 | 215b9c527e27b84097d4d426b7cf5bc0c05cc357 | /ToolHana/Hana.py | 8e416f112c6fe5f5131bd73128dd9562cef2d44e | [] | no_license | Quyetsama/PythonQ | fd02521d76873c4294a0a717d92d9473cff16c1d | 0f60e453a81028b055eb2a7f2a362fda3e97b34d | refs/heads/master | 2022-12-26T21:21:05.611884 | 2020-10-16T03:26:33 | 2020-10-16T03:26:33 | 304,508,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,298 | py | Hana.py | import argparse
import sys
from random import randint
from time import sleep
from selenium import webdriver
Hana_URL = "https://fb.vieclamonline.org/login"
def random_sleep(min_s, max_s):
sleep(randint(min_s, max_s))
def initDriver():
filepath='chrome'
chrome_options = webdriver.ChromeOptions()
ch... |
137c8a7e5c3eb8b181f20b4805d57a6fedcef7b7 | f22252298fd9fc7b41f8663d9fb22427c5a2f7c7 | /Framework code.py | b12d9daf52f96dcecda83e4188b3d2036fc0fee8 | [] | no_license | gtc666/2013-Summer | b5363c120e12bdb96c020c45a90ea6ab8bde1cb2 | 1b55f9b79a8fe4b9f9a970f44a4dda690adfb4e3 | refs/heads/master | 2021-01-17T14:47:16.889933 | 2016-07-28T21:37:46 | 2016-07-28T21:37:46 | 53,889,606 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,140 | py | Framework code.py | class Technology(object):
def __init__(self, label, color = "red"):
"""Each technology should be constructed with
a text label and a color for display purposes"""
pass
class User(object):
def __lt__(self, other):
"""this is a built in comparison function, so ... |
4f34425d6b19f773fa3a533eddb57e1b2c05ca3d | 8e3cf45505df84127f8548e1af61d3fa17fe2d45 | /sort/quick_sort_hoare.py | 3456ff11babf5dad40dac73380cb33b7e19901e8 | [] | no_license | agapeteo/python-data-algo | d478b5d6c44f2c70590298a11dcc700945502220 | 613aa833ca103ec1d1892988cc1f0aab0c26de0f | refs/heads/master | 2021-05-26T00:48:23.300499 | 2020-04-08T04:46:44 | 2020-04-08T04:46:44 | 253,987,841 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,814 | py | quick_sort_hoare.py | def partition(input_list, low_idx, high_idx):
pivot_value = input_list[low_idx]
left_idx = low_idx
right_idx = high_idx + 1
while True:
while True:
left_idx = left_idx + 1
if left_idx == high_idx or input_list[left_idx] >= pivot_value:
break
whi... |
2ed04aa8070dbbfad47dfdab630b7781efb43ef6 | fcf44d7b9466284d6be0d8f1a87ef70c86a98eb2 | /crud_config/exceptions/__init__.py | b7b817fa6938b3c5c019b24d4a49139502e20f18 | [] | no_license | mike6856/crud_config | f34eeed5629ccb2db69d7796625ead76197adefa | 85098ae1a0bc617fdbd46d4be05e59dfa533e59a | refs/heads/master | 2020-12-11T04:01:58.305922 | 2014-03-26T00:13:31 | 2014-03-26T00:13:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 65 | py | __init__.py | from base import *
from noresult import *
from notunique import * |
6bf1d410a33e3b2535e39e4f8c5c7f8278b3de67 | 9fb8ed674cf465248bd365a45d739fc49e12b65f | /src/draw_card.py | 8ee90e265ed5f8542f2733e3fedea4b93cb2eb6a | [] | no_license | AndrewPythonist/urbandictionary | e72d86ae61ae5845da51db9e2315697368eeb1c3 | 64b622c0e8c7b4976310a86d1d09e9827033aff1 | refs/heads/master | 2020-12-18T10:16:28.507211 | 2020-03-03T18:58:01 | 2020-03-03T18:58:01 | 235,344,522 | 2 | 0 | null | 2020-01-21T13:29:33 | 2020-01-21T13:06:11 | null | UTF-8 | Python | false | false | 1,483 | py | draw_card.py | from PIL import Image
from src import urbandictionary_api
from src.card.cardDrawer import CardDrawer
from src.card.cardModel import CardModel
from src.repository import Repository
from src.urbandictionary_api import get_random_word
def save_card(word, image_path, filepath='data/cards/', filename=None):
'''Функци... |
a096e811e50e25e47a9b76b1f813c51f4307bbfe | 08ed52698bf2a1f2cbd2f2dc0d84cab9dae75a9a | /mysite/drinks/filters.py | bd768610ecc4043070303736f0897d742412bcc2 | [
"MIT"
] | permissive | Lee-Geon-Yeong/py_pro | 2bc15258f9fbd67fca22106b14602454d296ffc3 | 309e711992f9b8aaf41d0f18f3920c3b31533b9c | refs/heads/master | 2022-12-20T10:44:27.843838 | 2020-09-03T02:11:28 | 2020-09-03T02:11:28 | 287,223,093 | 0 | 0 | MIT | 2020-08-13T08:25:15 | 2020-08-13T08:25:14 | null | UTF-8 | Python | false | false | 1,052 | py | filters.py | import django_filters
from .models import Drinks, Brand
class DrinkFilter(django_filters.FilterSet):
BRAND_CHOICES = tuple(
(brand.name, brand.name) for brand in Brand.objects.all())
name = django_filters.CharFilter(lookup_expr='icontains')
price_lt = django_filters.NumberFilter(field_name='price'... |
3ea42e7ad5301314a39bf522280c084342cd18c5 | 08147871f1adf678b4ab30e54332b9847c935387 | /backend/views.py | 53684fb8bd9d78e9faf5a59ef30d1a423f8ae967 | [] | no_license | teimurjan/digits-recognizer | 14f1e43727292d2c6ed84dff71f40ea6d1a61719 | 58c67e6e7bf397eba167ab20f830590653086779 | refs/heads/master | 2023-01-21T07:47:54.811079 | 2020-11-21T14:31:27 | 2020-11-21T14:31:27 | 126,943,941 | 3 | 5 | null | 2023-01-06T01:57:48 | 2018-03-27T07:08:28 | Python | UTF-8 | Python | false | false | 651 | py | views.py | from flask import render_template, request, Response
from flask.views import MethodView, View
from flask.views import View
from repo import ClassifierRepo
from services import PredictDigitService
from settings import CLASSIFIER_STORAGE
class IndexView(View):
def dispatch_request(self):
return render_temp... |
0c97569c77fb3598d83eba607960328bb2134dd2 | 3e563d850295a9622b6767086a9c1064eb137d78 | /train_dccnet.py | 186d2807a5b3b7a6e8db6c1a43aba4538923494c | [] | no_license | ShuaiyiHuang/DCCNet | c98532805d510ca17f20c0cfc84c78501113374e | e4f1932896153f535ba42c92f74980e3be27cefe | refs/heads/master | 2020-08-23T01:28:01.970538 | 2020-08-01T10:46:01 | 2020-08-01T10:46:01 | 216,515,401 | 23 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,015 | py | train_dccnet.py | from __future__ import print_function, division
import os
from os.path import exists, join, basename, dirname
from os import makedirs
import numpy as np
import datetime
import time
import argparse
import torch
import torch.nn as nn
import torch.optim as optim
from lib.dataloader import DataLoader
from lib.im_pair_dat... |
a65dfca1773c1e4101ebfb953e0f617a2c345695 | ca7d48a2c4a36e5a9da2b9895b97f39ed51d23f4 | /014.py | dd113bf3434ecde7deb85b7de979705dfff8bdb1 | [] | no_license | arogya247/Final450-Python | 235c434ac978463b13c8067a3f6896c4ed712f12 | d136a9d45aa29e3fdff8bd2f6c9c431a0fcdcefd | refs/heads/main | 2023-06-24T22:21:40.355011 | 2021-07-23T07:01:52 | 2021-07-23T07:01:52 | 354,887,112 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 300 | py | 014.py | def merge(self, intervals):
intervals.sort()
arr = []
for i in intervals:
if len(arr)==0 or arr[-1][1] < i[0]:
arr.append(i)
else:
arr[-1][1] = max(arr[-1][1], i[1])
return arr
|
49005500b299ca276f663fe8431bb955e5585bbd | a1246c76e547f450a46f3d8ca2e239c83b7cd678 | /mnist.py | d6c98ae86c33a8616cfab6c28d3713d80b95d66b | [] | no_license | grgurkovac/ANN-Framework | 6e473f4f480af4df37e3f2b490d69a8dac3200c9 | 511ca37fe39e91f181654e458f542e7c2ff6ee8e | refs/heads/master | 2021-06-19T09:45:03.110389 | 2017-06-02T01:06:28 | 2017-06-02T01:11:27 | 92,908,716 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,494 | py | mnist.py | import Net
import mnist_parser
import numpy as np
#To use this model it is required to download the MNIST database
#The donwloaded base is then needet parse to numpy using mnist_parser.parse_to_npy method
#The files genetared using mnist_parser.parse_to_npy are then loaded using np.load
in_values = np.load("MNIST/mnist... |
219929d52b5f1a0690590e83b41d2b4f0b2b3a51 | 703cc753039c7c27348fc2ec4f5090b69a9e141a | /chapter5/sort.py | d333c5eb73793a57ba2b92cf2f93184256badbb0 | [] | no_license | abin7-alpha/Solutions-think-python | 58a13359a64c7d07823e8f5c48adccfbad813b0d | 3d924940183622f491ae85cc86450ea40b7ada04 | refs/heads/master | 2023-04-07T23:05:37.555620 | 2021-04-17T16:34:40 | 2021-04-17T16:34:40 | 337,986,028 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 226 | py | sort.py | list = [3,1,2,5,4,7,6]
def sort(list):
for i in range(len(list)-1):
if list[i] > list[i+1]:
a = list[i]
list[i] = list[i+1]
list[i+1] = a
print(list)
sort(list) |
e884ce5878de75afe93085e2310b4b8d5953963a | 1a745c15025eddc6dce9fd07aaf999f0c6033547 | /regex/backreferences/backreferences_to_failed_groups.py | 4454bc19c8a7ce1bc00c76b5fad82a6059b363e1 | [] | no_license | hpcosta/hackerrank-regex | df68e60112f1757a8c33cdb8d0be86b2dd4f7590 | bbd1e38a4a0a58917524f4675c164487cee92a77 | refs/heads/master | 2021-01-12T08:24:47.992056 | 2017-01-09T08:51:56 | 2017-01-09T08:51:56 | 76,568,990 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 615 | py | backreferences_to_failed_groups.py | '''
Created on 13 Dec 2016
@author: hpcosta
'''
# https://www.hackerrank.com/challenges/backreferences-to-failed-groups
regex = r"^\d{2}(-?)\d{2}\1\d{2}\1\d{2}$" # Do not delete 'r'.
import re
print(str(bool(re.search(regex, raw_input()))).lower())
# Task
#
# You have a test string S.
# Your task is to write... |
9951588f581c5045154a77535b36d230d586d8a5 | 4892c0235c4ced802779904d8d0a5c79e9e82bf3 | /python-bsp/server2.py | 0c9098dc1142bfb99ee8b7abb0f495364e66157e | [] | no_license | Wursthupe/pki15ca | 2b9d6cfa6d01bbff69b190272c309dac7a3c352a | d4d2cb5b8e6b3f841433198599a91fabfe3ef9e9 | refs/heads/master | 2021-01-01T16:56:09.062484 | 2015-07-15T08:30:39 | 2015-07-15T08:30:39 | 38,097,538 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,082 | py | server2.py | from OpenSSL import SSL, crypto
from twisted.internet import ssl, reactor
from twisted.internet.protocol import Factory, Protocol
import os
from time import time
class Echo(Protocol):
def dataReceived(self, data):
print "Data received: " + data
# define cases
options = {
"gen... |
302accfd5001a27c7bbe6081856d43dbec704168 | 360f0dc127af25d74906d5c0468caa5cdc700d42 | /handlers/users/admin.py | 7a808725b44a967f31a609566c37b5b712d9f4ac | [] | no_license | Yarl745/redfriend | 8d604fd8953b87761014dfb50657ac0b01f97f80 | 0d5081652e1902314d33e0262fae11ce6da325e4 | refs/heads/master | 2023-08-21T17:54:10.175528 | 2021-10-16T11:50:17 | 2021-10-16T11:50:17 | 417,810,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,730 | py | admin.py | import asyncio
import logging
import random
from aiogram.dispatcher import FSMContext
from aiogram.types import ContentTypes, Message, CallbackQuery
from aiogram.utils.exceptions import BotBlocked
import keyboards
from data.config import ADMINS, ADMIN_CHAT_ID
from keyboards.inline.activate_menu import active_menu_cal... |
1c22d216df260d0137abdbc4a3224e3613fec353 | 536247f1840acb4ca34ee7cfa4537dd3ec8f1e83 | /sfmlPhysTest2.py | 239720c298db6c18c85e10210874086688540441 | [] | no_license | mvwicky/sfmlPhys | d8196cd07ce6a23ef8912db8bf1515ba1bf6dfef | 06125eb714431a0090a26bc39641b037b1839c77 | refs/heads/master | 2016-09-05T22:22:07.610662 | 2014-06-20T22:02:19 | 2014-06-20T22:02:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,047 | py | sfmlPhysTest2.py | debug=True
import sfmlPhysOld as sfPy
import random
import math
if debug==True:
import sfml as sf
import vecFuncs as vecF
def clicked():
if sf.Mouse.is_button_pressed(sf.Mouse.LEFT):
while (sf.Mouse.is_button_pressed(sf.Mouse.LEFT)):
if not sf.Mouse.is_button_pressed(sf.Mouse.LEFT):
return True
return ... |
6cc757b8970d8333b1af0608024cabca7dd0dd66 | 94a5d87d74a766a52d619a7faa49c4228d8689ba | /v0.1.py | f93da89f5fec9baf16fae0d706278153238c9917 | [] | no_license | okara83/MSinai | 98ce2749e4c9ab59f765064aade1407178158352 | 1157baf90ab409dffe75f59bcedf802f344b5844 | refs/heads/master | 2021-06-29T23:49:19.307159 | 2020-12-15T00:48:15 | 2020-12-15T00:48:15 | 97,054,796 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,910 | py | v0.1.py | ### NOTICE THE CODE FOR THE GUI WHICH I CREATED ALONG WITH THE DNA ANALYSIS SOFTWARE
## IS INCLUDED AT THE END OF THIS FILE (HOWEVER DUE TO CERTAIN BUGS I DIDN'T HAVE THE TIME
## to WORK OUT, I DECIDED TO COMMENT OUT THE GUI and ALLOW THE USER TO INTERACT WITH THE
##SOFTWARE THROUGH EITHER THE TERMINAL OR THROUGH THE P... |
777f4a000a9218d91851811aa4881641f3b496cf | f4a1b429c2a0fbec6b1d08b7a95ce7fe43ce133c | /examples/lenet300/utils.py | 0554ae11c1710ed4369360c51cbb470a96492fea | [
"BSD-3-Clause"
] | permissive | pandey-shruti/LC-model-compression | 8023d93670b5734685d6e27a0c4766f41e45c85e | bf12c3c1baad2bdd8d2aa3c560f8d7d0bed64a1e | refs/heads/master | 2023-09-06T05:27:50.622418 | 2021-11-23T10:53:51 | 2021-11-23T10:53:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,261 | py | utils.py | import numpy as np
import torch
from torch import nn
import torchvision.transforms as transforms
from torchvision import datasets
import torchvision
import os
from torch.utils.data import TensorDataset, DataLoader
def mnist_data():
if os.path.isfile('./datasets/mnist_dataset.pkl'):
return torch.load('./da... |
e44fee4a6f8e6ac94a8bfa3260a8364ec072cde7 | 3d939cfe1740e4b0a937438849ca710584c094be | /databricks_notebooks/python/mlflow/01_Write_Bundle.py | 7d3c8aa98c2cbc503dbf16c48de1aed2a5c027fb | [] | no_license | amesar/mleap-sampler | c9401760a8e1d83e20a66b1c3dfc5b0fa4a564e6 | eff78b60b78f16cece94f0bb9ba64a1d6ed0c9ec | refs/heads/master | 2021-06-22T22:46:15.387303 | 2021-06-12T03:07:21 | 2021-06-12T03:07:21 | 220,899,767 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,202 | py | 01_Write_Bundle.py | # Databricks notebook source
# MAGIC %md ## Write model as MLeap bundle to MLflow
# MAGIC * Log the model as MLeap flavor
# MAGIC * Save the data schema as an artifact
# COMMAND ----------
# MAGIC %md ### Setup
# COMMAND ----------
# MAGIC %run ../Common
# COMMAND ----------
import mlflow
import mlflow.mleap
mlfl... |
a4404e5e0b9fecb93b63a338e322d7c6c7f8ea4a | 032c3608bd4d67869fbd76deeeb14f4cc01d8192 | /setup.py | 22f90645bd8a190ebb4b5ae79c480eb3ce075a9f | [
"MIT"
] | permissive | shawcx/nelly | 265ea7ec9ddb0bc7703dce958333bce72bbb2a97 | 0e3e5e4bcb63b5e3482c702aa64893863a1e80ab | refs/heads/main | 2023-03-11T10:04:45.459843 | 2023-03-01T20:29:53 | 2023-03-01T20:29:53 | 59,595,008 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,351 | py | setup.py | #!/usr/bin/env python3
import sys
import os
from setuptools import setup
exec(compile(open('nelly/version.py').read(),'version.py','exec'))
def findDataFiles(root):
paths = []
trim = len(root) + 1
for base,directories,filenames in os.walk(root):
if base.endswith('__pycache__'):
conti... |
28a763f5aa7d6aabec6c71536065a9c623d5933c | df016446a899ef4dae3d8818d4e8336f447aa3ed | /playground/midi/create_midi.py | cf0d546a844b520c3beb1790651367b62e080461 | [
"Ruby"
] | permissive | mmakaay/nabaztag-v1 | 5407c6d076c8aba07560ec942a8e91a487155a0d | 421fc4d4f74ee05e872bc43c61bc61b05672eb26 | refs/heads/master | 2020-12-23T09:16:23.065115 | 2020-02-13T23:59:07 | 2020-02-13T23:59:07 | 237,107,717 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | create_midi.py | #!/usr/bin/env python3
from midiutil import *
MyMIDI = MIDIFile(1, file_format=0)
track = 0
channel = 0
pitch = 60
time = 0
duration = 1
volume = 150
MyMIDI.addProgramChange(track,channel,0,19)
MyMIDI.addNote(track,channel,60,0,duration,volume)
MyMIDI.addNote(track,channel,80,0,duration,volume)
MyMIDI.addNote(track,c... |
efa64b04c1d880e2dbab8903738201b91b1c875a | 289e2327b7fdf348c3e1508bb6780e7a4d425bc6 | /3_sort.py | 51028094c74666d885e0ef4ee3e07191ce8163ab | [] | no_license | JaahnaviGoli/pycbit-hackathon | 1ac8a7858f3f7458ece1f826975de57374c834fe | 83fe796b19b72749877d3648b1ae51744da96469 | refs/heads/master | 2021-09-10T02:22:09.406604 | 2018-03-20T17:46:40 | 2018-03-20T17:46:40 | 125,888,152 | 0 | 0 | null | 2018-03-19T16:29:00 | 2018-03-19T16:29:00 | null | UTF-8 | Python | false | false | 193 | py | 3_sort.py | list1=["Ron",
"Hermione",
"Harry",
"Professor",
"Dobby"]
list2=["The House Elf",
"Potter",
"Granger",
"Lockhart",
"Weasley"]
list1.sort()
for i in range(0,5):
str=list1[i]+list2[i]
print str
|
196d8359596a7819d32048fa6796c69f2347bbb2 | 11e2029374cf92072cf0cb461e9f451c060884dc | /src/importer/main.py | 8a736ebd1f569f225a6d40caef82544fdee3c81f | [] | no_license | eman1can/DatabaseVisualizer | 8bbbc225e52027e78ddc95089d3a5f642e9e8fff | 9976170507c7180314fc8afed4e8b540a28d18b3 | refs/heads/main | 2023-01-10T01:53:51.891124 | 2020-11-11T08:24:57 | 2020-11-11T08:24:57 | 310,413,635 | 0 | 0 | null | 2020-11-11T08:24:58 | 2020-11-05T20:47:55 | null | UTF-8 | Python | false | false | 2,928 | py | main.py | from src.importer.config_parser import Parser
from src.importer.connector import Connector
from os import listdir
from logging import info, warning, basicConfig, INFO
"""
The importer will do 2 things. It will parse and run an sql ddl file, and then load each table data.
"""
basicConfig(level=INFO)
file_path = '../da... |
e979f5c23a573948bb38f8d112ac99e81aa0e5df | ac8b725681e25177c5de3daf58afe00135241d0f | /leetcode/1694_reformat_phone_number.py | f90179794768e270ce17ad6fa8fab63bc96d20c6 | [
"MIT"
] | permissive | jacquerie/leetcode | 7af100ea1d7292c8c3da34210cf04d891be5561b | 0cb213b9c7bcb6efa11210e9ebc291befb560bb9 | refs/heads/master | 2022-05-19T22:19:46.284065 | 2022-03-27T02:41:58 | 2022-03-27T02:41:58 | 129,323,741 | 3 | 0 | MIT | 2021-01-04T01:41:50 | 2018-04-12T23:51:56 | Python | UTF-8 | Python | false | false | 1,019 | py | 1694_reformat_phone_number.py | # -*- coding: utf-8 -*-
class Solution:
def reformatNumber(self, number: str) -> str:
cleaned_number = number.replace("-", "").replace(" ", "")
if len(cleaned_number) % 3 == 0:
prefix, suffix = cleaned_number, ""
elif len(cleaned_number) % 3 == 1:
prefix, suffix = c... |
637d5da741f381d1d0564d4520f98c3401aeab5a | dac730af0fe66d5fc092fd6f7c47780eafce0a38 | /server/seeddata.py | c1e143d21a4c835b598d2f113fbb49f3ee3040e4 | [
"MIT"
] | permissive | yanigisawa/voting-tornado | c52f191d16651ae732ae4e1ffbcf8fff2291930e | f5f31dca82acf8734e940bf71f6c40ae871aa756 | refs/heads/master | 2021-01-21T17:36:58.551289 | 2017-06-26T18:58:08 | 2017-06-26T18:58:08 | 91,964,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,693 | py | seeddata.py | from pymongo import MongoClient
import urllib
from datetime import datetime
import json
import config
from models import Event, EventEncoder, Team, TeamMember
import requests
server = config.dbServer
user = urllib.parse.quote_plus(config.dbUser)
password = urllib.parse.quote_plus(config.dbPassword)
uri = 'mongodb://{0... |