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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
71a6140dd5e4cafdd639ec077c6372c3fbfe112a | 169d9b049bafa5ca9670849e4d835dd334849fe6 | /programs/day_8.py | 1419a0d7793083d08c05203cdac99760a6648ec0 | [] | no_license | sebastiaanver/AdventOfCode2020 | 299e7a3886e0238a1b8041fb98cfc1e76dd22049 | f30d9daf116bad93ac138f205569f79f4ac61e3d | refs/heads/master | 2023-03-31T05:56:24.198750 | 2021-04-12T13:19:59 | 2021-04-12T13:19:59 | 318,192,771 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,214 | py | day_8.py | def part_1(lines: list) -> (bool, int):
acc, line_nr = 0, 0
visited = []
while True:
if line_nr in visited:
return False, acc
visited.append(line_nr)
if line_nr >= len(lines):
print(f"reached last line: {acc}")
return True, acc
instruct... |
1f5a2139f991d4ce10fbef7eee84f9d682f04ff9 | b803eb1ab9c7a98dc8b8a00729b12f9b45b56e08 | /python/python_finding_the_percentage.py | de55fc534f79195298b8dff1e5e98d25366569e6 | [] | no_license | eguru/dsa | 439784426c6462ca5e547b6dd9d8ec4cb3b6e474 | b5bdd2d6b8140b3eed5f885affac54f9b1272e99 | refs/heads/master | 2020-05-29T09:16:43.176032 | 2016-09-28T10:04:55 | 2016-09-28T10:04:55 | 69,448,232 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 222 | py | python_finding_the_percentage.py |
d = { }
for i in range(int(raw_input())):
toks = raw_input().split()
d.setdefault(toks[0], map(float, toks[1:]))
marks = d[raw_input().strip()]
print "%.2f" % (reduce(lambda x,y: x+y, marks) / float(len(marks)))
|
5b2c929d6da16f724a844558e9909e1b6328096f | 859842906e5cb12d472ee3dc4d312d919e419ad9 | /mian.py | ec19e8611ad4f9bf6653e35e2f26481e5fb16a94 | [] | no_license | FrosTian/PushMotor | 898d7c83c7dc4bb0fe84478815941debcce6fc29 | 1082f635c22e8390eee086edb1f6defd87fada08 | refs/heads/master | 2020-08-18T05:09:32.942937 | 2019-10-17T09:14:12 | 2019-10-17T09:14:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | mian.py | from PyQt5.Qt import *
from resource.mainFrom import Ui_Form
class MainPane(QWidget, Ui_Form):
def __init__(self, parent=None):
super().__init__(parent)
self.setupUi(self)
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
window = MainPane()
# window.setWindowTi... |
714e47f26f04913cf308a8a25265ad49ad44c19c | 2110f0b15ffffff5e6b0b45c040d5199145f48a2 | /pull_data_yahoo.py | 4cd91465337c15c75f0d65982aa99aa1049a6baa | [] | no_license | lsdxp/Trading_Strategy | ff48fa9a882eb7baf20ae28482625cbfb98913c5 | b703fb36a798fb2c76fff5de3330c50a87d2a78a | refs/heads/master | 2021-01-20T11:50:11.003958 | 2016-08-30T03:59:27 | 2016-08-30T03:59:27 | 66,905,082 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 698 | py | pull_data_yahoo.py | import urllib
base_url = "http://ichart.finance.yahoo.com/table.csv?s="
def make_url(ticker_symbol):
return base_url + ticker_symbol
output_path = "/Users/shengdongliu/Trading_Strategy/output_data"
def make_filename(ticker_symbol, directory="SP"):
return output_path + "/" + directory + "/" + ticker_symbol +... |
5733efd04bd2ffa0a9b616490e510516484f1bbe | 4d2e72e2db85681c539b437fb4f9ed24fc5f1a76 | /Oanda-first/old scripts/instru_close.py | b0d5e6f9c3c14547ac3f078f781076b987179428 | [
"MIT"
] | permissive | davidhintelmann/Oanda-REST-V20 | 2c13406cc3a2604cbca78760cb1aa6947e8e5182 | 0e43321f14234a41786367ce892720340e40ad33 | refs/heads/master | 2022-12-19T19:49:01.280567 | 2020-09-29T21:24:19 | 2020-09-29T21:24:19 | 120,154,878 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,201 | py | instru_close.py | import json, sys, time, datetime, requests
import matplotlib.pyplot as plt
import numpy as np
def extract_token(path = 'res/oanda_api_key.json'):
with open(path) as data_file:
data = json.load(data_file)
return data['token']
def get_candles(token):
#print(token)
header = {'Authorization': ... |
62647e9868ad71810ba9fd4064ff1164fb629960 | ffb8fb6e9494117f1e5c98c067df86e7f1c3d1c7 | /day029/p_client.py | c04c04030320eb1709a9343b25c38039f3c4c50e | [] | no_license | anliu520/pyprogram | b4f56fa3bc18c2475dd6fb27d05d6017bfe5977c | f72c7b66fd5671c5f217f37e13b23720a5f7f4a4 | refs/heads/master | 2021-04-23T03:09:44.445763 | 2021-01-23T10:04:01 | 2021-01-23T10:04:01 | 249,892,917 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | p_client.py | #Author:Anliu
import paramiko
#实例化一个SSH客户端对象
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy)
ssh.connect(hostname="192.168.42.3",port="22",username="root",password="123456")
print("---------链接上了---------")
while True:
cmd = input(">>>")
stdin,stdout,stderr = ssh.exec_command... |
2f58c6de0af7047c8a6eeef8f4ca1edc1539c804 | c6e69da6c2fd049390288b02a26151d553672691 | /csv_handling.py | 2fbb30eaa8779dcebedc3931dd9688af0540fece | [
"Apache-2.0"
] | permissive | nickinack/crawler | adf5eed87397e3284dc95a10868421071891117d | 7b8dfd33263374cf6b70fe637331aacb152cbfdf | refs/heads/master | 2022-08-25T14:08:27.756470 | 2020-05-22T18:20:40 | 2020-05-22T18:20:40 | 265,570,641 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,026 | py | csv_handling.py | #Handle csv's used
from config import *
import pandas as pd
import pandas as pd
import csv
import re
#function to create headers for the action set
def add_columns(candidate_set , initial_size):
csvfile = 'action_document.csv'
with open(csvfile , 'w', newline = '') as csv_file:
writer = csv.DictWriter(... |
25d3387e0d8af6760b239a103cc9388e9a615614 | 9898fb0ca2d6d3ed3290bb08033c8df530fcafd8 | /inspirehep/records/views.py | f44b0275a9a89f3fe070d8b8ab909a02ee3c9dad | [] | no_license | ammirate/inspirehep | 863397543a94cc0ca2628e27947daea48c3c6b06 | fbbc45fb47f95b44d9b7afeb3e6c17f82327d273 | refs/heads/master | 2020-04-25T11:27:26.354082 | 2019-02-26T16:06:35 | 2019-03-05T15:42:15 | 172,744,846 | 0 | 0 | null | 2019-02-26T16:07:52 | 2019-02-26T16:07:51 | null | UTF-8 | Python | false | false | 1,597 | py | views.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 CERN.
#
# inspirehep is free software; you can redistribute it and/or modify it under
# the terms of the MIT License; see LICENSE file for more details.
from functools import partial
from flask import Blueprint, abort, jsonify, request
from flask.views import MethodView
... |
9103191c2be911371f03775c869146756c61cb36 | cc0228f36a84eedf0dd3a26461ca819adb008523 | /led_my_printer_glow.py | aaac956ec65dd8491bd28f4e6979ba82f5b0b7d3 | [] | no_license | calliconfused/OctoPrint-LEDmyprinterglow | c863adff38873be9dce06434cb4656f0a4c3ed11 | 2ee62ceabf808148514158aa9d248281ca49f920 | refs/heads/master | 2021-05-04T11:16:33.678982 | 2017-03-11T16:18:55 | 2017-03-11T16:18:55 | 51,304,869 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,967 | py | led_my_printer_glow.py | # coding=utf-8
from __future__ import absolute_import
import pigpio
import time
import octoprint.plugin
from octoprint.events import Events
pi = pigpio.pi()
__plugin_name__ = "LED my printer glow"
__plugin_version__ = "0.1.0"
__plugin_description__ = "Handle LED strips in your printers box"
__plugin_author__ = "Pasc... |
8f841ec22e6039b3659cc1433d821b08121802ab | 9170eafb0c92894bfb09f0d7e0d1da5621288433 | /Models/leloup19model.py | 0618009a6c67573adb8792f84a699c2adb1a41af | [
"MIT"
] | permissive | pstjohn/circadian-methods | 3d4d86ae528c52726e1bd8887e592686882198ea | df76d5e8c497734d01f6ecf170aaded8abaa67a0 | refs/heads/master | 2020-12-03T10:42:07.556805 | 2018-01-25T19:21:47 | 2018-01-25T19:21:47 | 23,400,752 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,777 | py | leloup19model.py | import casadi as cs
import numpy as np
# Define Constants
# Sensitivity Constants
ABSTOL = 1e-11
RELTOL = 1e-9
MAXNUMSTEPS = 40000
SENSMETHOD = "staggered"
# Model Constants
NEQ = 19
NP = 95
paramset = [0.8, 0.4, 0.8, 0.4, 0.8, 0.4, 1., 0.2, 0.8, 0.4, 0.6, 0.6,
0.6, 1., 0.02, 0.02, 0.02, 0.02, 0.02, 0... |
3b4a18674f0f4fab030ada803633f24b8d760d26 | f11307f3e6f6a843061d3997b1341919ae13cd25 | /corpaction/main.py | 844b43be0b3490da8d27775fd00980322d8cd79b | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | vivekhub/NSEEvents | f09c4e28e7faae533d31c82dffce5d74a5073e3c | ea2594f045b85d0e0920fa64fec60b1ca37390cd | refs/heads/master | 2023-02-08T13:25:06.694402 | 2022-10-03T10:53:24 | 2022-10-03T10:53:24 | 4,023,984 | 2 | 3 | MIT | 2023-01-30T23:07:21 | 2012-04-14T10:17:17 | Python | UTF-8 | Python | false | false | 288 | py | main.py | #!/usr/bin/env python
import savedb
import parse_corpaction
def main():
fi = parse_corpaction.loadparsefeed()
print('Found ', len(fi), 'items')
savedcount = savedb.savedb(fi)
print('Added ', savedcount, ' items to the database')
if __name__ == '__main__':
main()
|
c6472cbd89def1477b34016b8f1cc076fa735d95 | 0d57116542d6a7ee93718328929fb967a8b172dc | /main.py | 62a03f6470992c92338b5844aedfd9fd97f88223 | [] | no_license | ruclion/PPG_T-SNE | 1212b8f903819e06930c3633774c117f58b71608 | ca8a8648929a2d82607d26461a2a69a38e16780c | refs/heads/master | 2022-12-17T22:35:56.932992 | 2020-09-23T07:07:56 | 2020-09-23T07:07:56 | 291,668,298 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,488 | py | main.py | import os
import sys
import numpy as np
from time import time
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from sklearn import (manifold, datasets, decomposition,
ensemble, random_projection)
import random
from sklearn.externals impor... |
5482a07003c9027a5f2bd827c3790ac60af3c340 | da39df1a594c8bbc88f98f768e9d0b5735459d81 | /andr_omeda/andr_update/models/precheckoutquery.py | 72a1b7875c88cd6979893846e4bdfa3d926297f2 | [] | no_license | IhebTrabelsi/andr_omeda | fbc1bde9d3d6419ba75f9f3fabd402e9074b46f5 | 165e98878e2616ad67ba5ca07ed438fcc4c0259b | refs/heads/master | 2023-05-25T23:18:54.384708 | 2021-06-09T18:30:15 | 2021-06-09T18:30:15 | 344,915,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 895 | py | precheckoutquery.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from andr_omeda.andr_update.models import Update
class PreCheckoutQuery(models.Model):
order_info = models.OneToOneField(
"OrderInfo",
on_delete=models.CASCADE,
blank=True... |
727e1a7054385ead5f5a2c996daad8a141cb3234 | c1c9df5adede149efe9ae97d19a0baa13017d579 | /04/task_4_3.py | 462fc42675c4f22d48cb37f29620cd88a66b0667 | [] | no_license | TarasKindrat/Python | 61be57434cfed08135ac600d164c18b937647b1f | 2a356d5fd8b0ee6f67170cb5bb664aba7862e823 | refs/heads/master | 2022-09-04T10:27:09.779859 | 2022-08-10T15:20:04 | 2022-08-10T15:20:04 | 169,612,336 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 504 | py | task_4_3.py | # -*- coding: utf-8 -*-
'''
Задание 4.3
Получить из строки CONFIG список VLANов вида:
['1', '3', '10', '20', '30', '100']
Ограничение: Все задания надо выполнять используя только пройденные темы.
'''
CONFIG = 'switchport trunk allowed vlan 1,3,10,20,30,100'
number = CONFIG.find('1') # find position
slis_e = CONFIG[... |
ea8b3628e975cd810e849fa500c3301f75043970 | 13b5198d3a28ac58ce252674fe098bddafe8e557 | /bkDjango/Users/views.py | 2c0a909759e87d3267037ed7ad18924dff5a278e | [] | no_license | BK-bokai/bkDjango | 8037be765533a5e6fc281020b5967b13003f6c4c | fff9ec7bffae4a42e7f9ef982682ac62666057c2 | refs/heads/master | 2020-09-15T07:09:46.804648 | 2019-12-19T08:43:10 | 2019-12-19T08:43:10 | 223,373,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,503 | py | views.py | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse, Http404, HttpResponseRedirect, JsonResponse
from django.template import loader
from django.urls import reverse
from django.views import generic
from django.views.generic import ListView, DetailView
from django.views.generic.bas... |
6f5432512f558716b58b3b4e4fce1c80943b28e4 | 8a5cac261a8a216fdd68812a46677aa3717af638 | /scripts/skills_interactive_marker_fetch.py | babfcd1d720015af07dd6ec1d8bc679e6e07a4d3 | [
"MIT"
] | permissive | CRLab/mico_skills | feea9226fe161614cfd9994c3ad7fe7d939facea | a5d42b9dc06ffb611825617aa18908d30869dcc2 | refs/heads/master | 2021-08-23T18:01:44.808505 | 2017-12-06T00:46:55 | 2017-12-06T00:46:55 | 104,269,984 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,565 | py | skills_interactive_marker_fetch.py | import rospy
import copy
from math import sin, cos
import sys
import moveit_commander
import roscpp
import graspit_msgs.msg
import graspit_commander
import actionlib
import geometry_msgs
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
from control_msgs.msg import FollowJointTrajectoryAction, Foll... |
801e3810c959c3ed83e65865beeeb323caebce2e | 0327cc6d68854451ccb9e19c31e8fa2ad68b0cca | /MISHomeRun/game/migrations/0001_initial.py | 4624d9b09be9526916aa3d76235451e73a436c5c | [] | no_license | lavender15963j/MISHomeRun | 189ffe03e9af9c925b8f843717b6570a95458f55 | e02e787560015e855fe6ae7cf234fc23cb60d0b6 | refs/heads/master | 2021-01-23T18:08:25.550777 | 2017-06-04T07:16:39 | 2017-06-04T07:16:39 | 82,994,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 995 | py | 0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('team', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Game',
fields=[
... |
71b0f1d223b20f55a49d5efd021771c4ba1ea4ae | 063698ff5481047e37533d7ca1cc084d7ab3c2a9 | /apps/belt/urls.py | 68eabb957793a5c12f059dc0042bf64f0653ef13 | [] | no_license | jrdjeffo55/belt_reviewer | 4348f5d79734d4bd785914407043e08ffc51e2ba | aab671a33082b092c5f3023953a096e8e11fb74d | refs/heads/master | 2021-07-06T01:13:49.828631 | 2017-09-27T21:26:29 | 2017-09-27T21:26:29 | 105,070,765 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index),
url(r'^books$', views.home),
url(r'^logout$', views.logout),
url(r'^books/add$', views.create),
url(r'^books/(?P<id>\d+)$', views.showbook),
url(r'^users/(?P<id>\d+)$', views.showuser),
url(r'^books... |
a76fcb654084130c9baebcef73a04661401a5d69 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_field.py | 5fee25d86859e8452fa0569de60f9e1366e7bfc8 | [
"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 | 542 | py | _field.py |
#calss header
class _FIELD():
def __init__(self,):
self.name = "FIELD"
self.definitions = [u'to catch or pick up the ball after it has been hit in a game such as cricket or baseball, and to try to prevent the other team from scoring: ', u'to avoid answering a question directly: ', u'to have or produce a team of... |
3d8a636ad1e57026f667817817de19c0d706d6cf | 4151678ad8be329a3afd908e595cebfafee2e9e6 | /examq/q10.py | 41c458e5efe23ef82c2ebb04375d91253fa2ae4a | [] | no_license | kirubeltadesse/Python | 3554cc64be4dd1790da01a5c4a01674d92856676 | f12851af7e3a1750891a1e7aa22f6d241340a360 | refs/heads/master | 2021-01-22T22:13:44.026162 | 2017-04-28T15:58:35 | 2017-04-28T15:58:35 | 85,522,727 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 697 | py | q10.py | # kirubel Tadesse
# Dr.Gordon Skelton
# J00720834
# Applied Programming
# Jackson State University
# Computer Engineering Dept.
# 10. Write a program that uses the data from the numbers.csv file and sorts them in descending order. You can print the modified list if you want. The highest number is 10 and the lowest ... |
a974e25c7cb7dd0f2de8267e19b67fa9b523da1f | 9ddd1315e428afdf3a12ca6b1066bc2e3663dd6e | /Source/tests/test_db_connector.py | 91715e67aa73097d4a6152480b2a7dca3bc24c05 | [] | no_license | xiaomaflying/Maxinmin_SR_Python_SysInfo | 8040e6e5279e4e426ab568a4731bd7ff34c41e86 | 65610a0299c35231e00ec60dd36e93c21730b8b7 | refs/heads/master | 2021-09-02T04:17:37.109397 | 2017-12-30T09:03:22 | 2017-12-30T09:03:22 | 115,780,807 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,341 | py | test_db_connector.py | import unittest
import subprocess
from lib.connectors import DBConnector
from tests.config import DB_CONFIG
def import_sql_script(conf, sql_script):
cmd = ['mysql', '-h', conf['host'], '-u', conf['user'], ]
if conf['password']:
cmd.extend(['-p', conf['password']])
with open(sql_script) as input_fi... |
7f4851e7a41f179789aa4e637dd853fc11c3653a | 4b6bd10dd53d5400f30344ec003c148b53c2763e | /teelebot/polling.py | 9c5785890a9b616aa003c6c677ee373e498e1696 | [] | no_license | fx120/telebot-invitecode | 0a9cb297abf25232070098a6269081f9316d8b25 | 9ebbf77e85620485574b7bebd61d247e9a1d6612 | refs/heads/master | 2023-01-28T01:32:52.528486 | 2020-12-04T13:40:10 | 2020-12-04T13:40:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 632 | py | polling.py | # -*- coding:utf-8 -*-
'''
@creation date: 2020-6-23
@last modify: 2020-11-23
'''
import time
import sys
def _runUpdates(bot):
plugin_bridge = bot.plugin_bridge
plugin_list = plugin_bridge.keys()
try:
while True:
results = bot.getUpdates() # 获取消息队列messages
messages = bot._... |
6528d1f47ea5fd0a7f4ce5961b840f92a77099c7 | cd159f35b51faa83a1104d368dce2f7e282fbc6c | /Covid/prediction.py | 31ca3b3c2cf03303582c289fbe02138f09aa2819 | [] | no_license | KizitoNaanma/Diagnosis | 176758947f2c2cbc5ad6990aa8a2622eb79806ab | 0250c5f79a16da486f54ed78a8198170e54192dd | refs/heads/master | 2023-05-23T13:11:13.168052 | 2021-06-13T08:25:33 | 2021-06-13T08:25:33 | 298,124,515 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 774 | py | prediction.py | import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
import pickle
df = pd.read_csv('static/data/clean/Training.csv')
# df.info()
# df['prognosis'].unique()
X = df.iloc[:, :-1]
y = df['prognosis']
X_train, X_test, y_train, y_t... |
fdcfc890096baebf9a35d380354afdd6eddf26ca | 3aae410053c0a84536d97f79157ca939119923e5 | /venv/lib/python2.7/warnings.py | d0a3e4fe3439e0dfb24ddfd5fa25c50644353eaf | [] | no_license | jckelley/Hire100 | 418e273b1a81028d01f730cc3bc8388786df5c6b | 91f35a0843cdbccd61eccc030d4f4224b85348c2 | refs/heads/master | 2021-01-01T05:16:18.150137 | 2016-04-29T19:26:15 | 2016-04-29T19:26:15 | 57,400,460 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 49 | py | warnings.py | /home/osboxes/anaconda2/lib/python2.7/warnings.py |
64990317159c67900da959b3dff40ce561745591 | 7cab2024d4c431815c1ae9436c9a77304872071e | /beautiful_code/artcode.py | e46251455b4e3964b693e3876444b1aa1e4184ba | [
"MIT"
] | permissive | Codefans-fan/python-qrcode | 3f44a019ddb5d6d04f5ec95836ca9f53f76e4f73 | 9a3e8c3e848f97d995d09d69eb248136c5d79b35 | refs/heads/master | 2021-01-11T17:12:35.834378 | 2016-04-08T11:00:10 | 2016-04-08T11:00:10 | 54,966,128 | 0 | 0 | null | 2016-03-29T10:12:20 | 2016-03-29T10:12:19 | null | UTF-8 | Python | false | false | 1,180 | py | artcode.py | # -*- coding: utf-8 -*-
'''
Created on Apr 8, 2016
@author: fky
'''
import qrcode
from PIL import Image
from PIL import ImageDraw
class ArtCode(qrcode.QRCode):
def __init__(self,back_img=None,transparent=100,version=1):
super().__init__(version=version)
self.transparent=transparent
... |
a828222a6a690f0d85e0308f535bd2745124ceb0 | 0aa2627e32c9fc5b81d76c0bd979ec741eb2094f | /Practice/MaximRodin/Task3/FirstTask.py | 21a237481dc4f3838f587450a9c62f9a4728a785 | [] | no_license | leksiam/PythonCourse | 7548596f57273fe4f90f56f6fe7fc18e03f58b0a | f626c6ec636f712cb65e89afc63774abb86f9725 | refs/heads/master | 2020-08-28T20:42:31.485332 | 2019-10-25T22:25:25 | 2019-10-25T22:25:25 | 206,125,407 | 0 | 0 | null | 2019-09-03T16:44:19 | 2019-09-03T16:44:18 | null | UTF-8 | Python | false | false | 221 | py | FirstTask.py | lst = list(range(1, 101))
i=0
for i in range(len(lst)):
if lst[i]%15 == 0:
lst[i] = "FizzBuzz"
elif lst[i]%3 == 0:
lst[i] = "Fizz"
elif lst[i]%5 == 0:
lst[i] = "Buzz"
print(lst)
|
f45dd7aad39c3a6fa292a0519c07d67cd91e89bc | 2120af55bf7775812521e26510c8eca375257751 | /acmicpc/21년 1월/20210126/문자열 다루기 기본.py | dce1dc188ac9fc42475802e97d6278688cd6bc8c | [] | no_license | JUNGSUNWOO/Algorithm_study | dac1dbad52929a3db00d35c4037997b29e3689d5 | 799d37dd064b161a28d375374e8d567582e9a84f | refs/heads/main | 2023-03-03T18:52:44.575800 | 2021-02-15T13:49:42 | 2021-02-15T13:49:42 | 328,672,820 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | 문자열 다루기 기본.py | s = "123456z"
def solution(s):
num = "0123456789"
answer = True
if len(s) > 6 or len(s) < 4 or len(s) == 5 : answer = False
else :
for i in s :
if i in num:
answer = True
else : answer = False; break
return answer
res = solution(s)
print(res)
'''def... |
906d4c11f2fcb8d72175f556a370ad55c6890d2c | acafe4fccd452607c284b4d05d2a0b1925032e1d | /python_bot_read_input_file.py | 4991a1d131dc66781e4d3ccba26946a6477d410b | [] | no_license | tuomaskupila/python-dummy-bots | c1c9e11584d736b52d0c894c45cf100b5f1e4bd3 | a735fb3cb230735cb87cf473db7a8c6bdb01d6b1 | refs/heads/master | 2022-12-03T02:51:21.967606 | 2020-08-10T06:43:35 | 2020-08-10T06:43:35 | 286,392,165 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | python_bot_read_input_file.py | import sys
def main():
print("This robot prints the contents of the input file to the user.")
if len(sys.argvs) < 2:
raise SyntaxError("No input file given!")
input_file = sys.argvs[1]
with open(input_file, 'r') as file:
for line in file:
print(line)
if if __name__ == "__ma... |
0dddf3d46b85900d22f17f66f75b18278e9505d7 | 44b87d9faad99d542914c35410ba7d354d5ba9cd | /1/oop/inheritance/mitiple inheritance.py | 93d37b1e3a7bfebc5c4bfddc24d9fee7b7329802 | [] | no_license | append-knowledge/pythondjango | 586292d1c7d0ddace3630f0d77ca53f442667e54 | 0e5dab580e8cc48e9940fb93a71bcd36e8e6a84e | refs/heads/master | 2023-06-24T07:24:53.374998 | 2021-07-13T05:55:25 | 2021-07-13T05:55:25 | 385,247,677 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | mitiple inheritance.py | class Person:
def pval(self,name,age):
self.name=name
self.age=age
print(self.name,self.age)
class Child:
def cval(self,roll,adrs):
self.roll=roll
self.adrs=adrs
print(self.roll,self.adrs)
class Student(Person,Child):
def sval(self,mark,cls):
self.mark... |
56949364feec88c9ee3d1c8e49235ebc3839b14b | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/226/users/4124/codes/1724_2527.py | 0a44a918ae393cf100f8aeb96482d81773a09f51 | [] | no_license | JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 205 | py | 1724_2527.py | x = int(input("Digite um numero inteiro: "))
y = 0
total = 0
while(y < x - 1):
y = y + 1
if(x % y == 0):
print(y)
total = total + y
if(total == x):
print("PERFEITO")
else:
print("NAO PERFEITO")
|
c3991bc974f8a3d04215c2d7bd0653175e516eac | 43f57a4c2595a4cb79926e5bb9dd259616d96062 | /django/helloworld/hello/views.py | 98da8025e237b12f10dbee09fca83300fafc88a8 | [] | no_license | JuHwanKimmm/wku_likelion | de8dedb8f7d66d0f34ee4158d6aa00318afb0970 | 4b351adfebdc7a6719c9b409850c4c9b93f6c814 | refs/heads/master | 2020-04-14T03:29:27.925040 | 2019-03-07T13:42:06 | 2019-03-07T13:42:06 | 163,609,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 367 | py | views.py | from django.shortcuts import render
from hello.models import Hello
# Create your views here.
# GET Hello
def hello(request):
# ORM
# SQL문을 소스코드로 치는거
# select * from hello_hello
post = Hello.objects.all()
print(post)
context = {
'post': post
}
return render(request, "hello/ind... |
81e1a620b04782b262b11729add0293aee667621 | dd9093109a636f68703fd43970526b1f016d61dc | /GP/python/restapi/test/unit_tests.py | 9c9de5036f054ff5d55f513fde9eb5727ca65ea1 | [
"MIT"
] | permissive | Bolton-and-Menk-GIS/Geoprocessing-Services-JSAPI-2018 | 66b639c395fe7bc85ff28bcac6dfae143d291b59 | afb8f9153edc04bd81335b177ff45d895bcfc711 | refs/heads/master | 2020-03-18T18:03:28.291894 | 2018-06-12T16:09:55 | 2018-06-12T16:09:55 | 135,068,978 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,411 | py | unit_tests.py | #-------------------------------------------------------------------------------
# Name: restapi_test
# Purpose: tests the restapi module.
#
# Author: Caleb Mackey
#
# Created: 04/03/2015
# Copyright: (c) calebma 2015
# Licence: <your licence>
#
# Disclaimer: The test services used below will... |
e5e58292b6e3cd8caf444fd95952672b11b0b0a1 | 71f5bbb51a76b0081447c68989717c3fb383fb17 | /papers/3.Transformer/transformer.py | ce9a74f7f51c9514cbf72588d96e06c58ceb89fb | [] | no_license | euhkim/NLP | ec910073860b1b16909e90a4f9a5d370cfb83e04 | ca033284850147b334d3771df8235a1135eba76c | refs/heads/master | 2023-02-12T05:05:23.329991 | 2021-01-06T13:13:15 | 2021-01-06T13:13:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,811 | py | transformer.py | from typing import Optional
import torch
import torch.nn as nn
class Transformer(nn.Module):
def __init__(self, src_size: int, trg_size: int, seq_len: int, d_model: int, d_ff: int, enc_pad_idx, dec_pad_idx, device,
num_encoders: int=6, enc_num_heads: int=8, num_decoders: int=6, dec_num_heads: int=... |
6da29337a71a543d45d8a6dd88d6fe79382a8b14 | 7b9d7c55e649ec9171d47730a93841e8f9eeaa42 | /extractPDF.py | de69ce90d176647f9375fd689f97e8aec2a9e27c | [] | no_license | doxsee/extractPDF | 491dad44099474c5ce71cc77ebd697cd3da4c86b | 77109cf3116600270d8e9d3c1a8455947be90054 | refs/heads/main | 2023-07-17T05:32:08.432203 | 2021-09-10T04:30:57 | 2021-09-10T04:30:57 | 404,950,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 685 | py | extractPDF.py | import re
import PyPDF2
import csv
import os
directory = '.'
for filename in os.listdir(directory):
x = os.path.join(directory, filename)
f = open('PO-GoodsMarking.csv', 'a', newline='')
writer = csv.writer(f)
if ".pdf" in x:
pdfFileObj = open(x, 'rb')
pdfReader = PyPDF2... |
1cbdf8c1c8730665c23b98187a9bc8f8d33ef08c | 7de13687d77ef9704c6adccf5a6ff61d46384b2c | /02_flow_homework/02_for/04.py | e51151bad0655506c960b57a194f38cf9d2d9206 | [] | no_license | marczakkordian/python_code_me_training | 72f5f20d17dd4675a3c14b2c6d70aa0dde54bd4f | fc5ef0604254492116013e3042b4eeb3fe8fdda5 | refs/heads/main | 2023-05-12T04:18:14.369918 | 2021-05-26T15:23:38 | 2021-05-26T15:23:38 | 339,779,472 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 533 | py | 04.py | # Napisz program, który wyświetli kolejne wyniki dla silni liczby naturalnej N (N podane przez użytkownika, ale nie większe niż 8).
# user input
n = int(input('Please type integer number (0-8): '))
s = 1
t = []
if n > 8:
n = int(input('Please type correct integer number (0-8): '))
elif 0 <= n < 2:
for n in ra... |
ed9d528eaf0ba31f1a3df094119d92d1f20d3cc1 | 1ceed2f59135ecedb88624d8d91f08c9fbce54f2 | /customer_DB/migrations/0005_auto_20200314_1451.py | daeca837165d4f211b1a725aa358688b803c4d5c | [] | no_license | boluuu/hym | 130f9d6afc1d74c689dfc3ca86fb8cc415ef16ce | 88cf6a096a6aa4982cf1b34f96dcf53b586cbb24 | refs/heads/master | 2022-12-10T22:57:25.155517 | 2020-05-20T14:10:34 | 2020-05-20T14:10:34 | 252,735,108 | 0 | 0 | null | 2022-12-05T18:05:36 | 2020-04-03T13:08:30 | CSS | UTF-8 | Python | false | false | 2,751 | py | 0005_auto_20200314_1451.py | # Generated by Django 3.0.3 on 2020-03-14 13:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('customer_DB', '0004_auto_20200312_1751'),
]
operations = [
migrations.AddField(
model_name='details',
name='ankle',
... |
ca2edb942e224b7b26911613491960f976f97249 | 50942fc69d6455192dc0b755733b645719180858 | /workspace/accounts/models.py | 4ed27a58a2078d00fab3e7121622a12874125b9a | [] | no_license | Scorn1234/scorn1234 | 029d1d0488b1c9203f29b0043733128eafb62192 | ef25af1db5be944c62827d0734c09f55d36f7c32 | refs/heads/master | 2020-01-23T21:43:56.182254 | 2016-11-24T15:32:08 | 2016-11-24T15:32:08 | 74,684,161 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,068 | py | models.py | from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
# Create your models here.
class Sitter(models.Model):
user_id = models.OneToOneField(settings.AUTH_USER_MODEL)
gender = models.CharField(max_length=10)
dwelling = models.CharField(max_length=100)
... |
24215b1d36c2b203b762798f9889a9d8876b907a | 0e39a4bb9ecc92dfae9d52bff15d8555baef18d8 | /erm/migrations/versions/1625bfe8180d_added_edited_at_field.py | 526fd71212a5ae5fa16d27722404f8792eaff44c | [] | no_license | likit/stin-research-is | d639ab04ae95be079864383da4409b6ed58a9266 | 5e968bba163127b0b572850c6ae6e57d81c0317a | refs/heads/master | 2022-12-20T00:08:22.773701 | 2022-08-26T03:05:32 | 2022-08-26T03:05:32 | 177,754,138 | 1 | 0 | null | 2022-12-08T04:54:36 | 2019-03-26T09:19:56 | HTML | UTF-8 | Python | false | false | 734 | py | 1625bfe8180d_added_edited_at_field.py | """added edited at field
Revision ID: 1625bfe8180d
Revises: 6f6a0f3ade5e
Create Date: 2020-05-11 02:31:56.975794
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1625bfe8180d'
down_revision = '6f6a0f3ade5e'
branch_labels = None
depends_on = None
def upgrade()... |
3f400fbb006b784d763576777bfa2b6fdbef6a77 | 0e0ce88c886370df9af51855115c99dfc003e5da | /2011/16_Visual_Python_Aulas/demonstrações/pendulo_e.py | 1cbe10e6be5c8418999f20d533ae839b40454cc6 | [] | no_license | miguelzeph/Python_Git | ed80db9a4f060836203df8cc2e42e003b0df6afd | 79d3b00236e7f4194d2a23fb016b43e9d09311e6 | refs/heads/master | 2021-07-08T18:43:45.855023 | 2021-04-01T14:12:23 | 2021-04-01T14:12:23 | 232,007,012 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 922 | py | pendulo_e.py |
from visual import *
from math import *
scene.range = (10,10,10)
scene.center = (0,-4,0)
scene.width = 400
scene.height = 700
massa= sphere (pos = (0,0,0), radius = 0.5, color=color.red)
base = box (pos = (0,-10,-2), size = (7,0.5,7))
haste = box (pos = (0,-4,-2), size = (0.6,12,0.6))
pitoco = cylinder (... |
5ed1cfe6eed31a3f099b9e440f5fb3c94923b2d8 | 4e5069872255ea222c2a61206230ea20ce28d540 | /pytablewriter/_error.py | acc1b5b4514d81735e3fc0338846070d6fccc989 | [
"MIT"
] | permissive | ChinaQuants/pytablewriter | a4b296f87fcfd4cf59d633fa7fa5be38fdafdc85 | 749cca8d3c62ad6a56302c1b826b8fbd1bd7863d | refs/heads/master | 2021-01-24T23:50:59.363296 | 2016-05-29T14:31:28 | 2016-05-29T14:31:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 629 | py | _error.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
class EmptyTableNameError(Exception):
"""
Raised when a table writer class of the |table_name| attribute is empty
and the writer is not permitted empty |table_name|.
"""
class E... |
4b73c91c7d0ef833f31f1199e39a7ff0ef6b23df | aeb394573d60fe09f1b50ff895ec4e2330f65006 | /Domain/serializers.py | 0707e2b77636bead83a588b44770fcb9377fab14 | [] | no_license | farashiani-khalil/real_estate_agency | 3625ab64cc1a2971793e460289349e1bf5dcf837 | 46e2ad0b0a477a80f188516d8c40cfe004904a29 | refs/heads/main | 2023-04-03T21:40:09.823606 | 2021-04-01T13:54:28 | 2021-04-01T13:54:28 | 353,427,896 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 303 | py | serializers.py | from rest_framework import serializers
from .models import Buy, Rent
class BuySerializers(serializers.ModelSerializer):
class Meta:
model = Buy
fields = '__all__'
class RrntSerializers(serializers.ModelSerializer):
class Meta:
model = Rent
fields = '__all__'
|
bedd46042c57c32ff84e011998a9ca313e5fab8e | aaf217271b1cbaa3a6669b15a990f11b541080a7 | /data/atomap_vers_eoc/api.py | f257ee06def148b81d250b49d794cfe77921f180 | [] | no_license | PinkShnack/MMC_2019_EMAG_2DMaterials | 76cdc0c525e74cdd8ae41c5a62d7a8753bb95647 | a1e489d681bce8581d248dfa832bc2ef111b57bc | refs/heads/master | 2022-07-08T10:43:30.948677 | 2020-07-09T10:27:32 | 2020-07-09T10:27:32 | 193,884,746 | 0 | 0 | null | 2022-06-21T22:13:01 | 2019-06-26T10:40:16 | Jupyter Notebook | UTF-8 | Python | false | false | 618 | py | api.py | from atomap.atom_finding_refining import (
get_feature_separation, get_atom_positions)
from atomap.main import make_atom_lattice_from_image
from atomap import process_parameters
from atomap.io import load_atom_lattice_from_hdf5
from atomap.initial_position_finding import (
add_atoms_with_gui, )
from ... |
b4e2b5a0fc8230936a4c37091e1311c02a088e4b | 932b7b2ef606ce392bae404304728056fc5720eb | /easyrules/api/condition.py | 54b8a2e18e29e438deef7b6c8217310165cc9602 | [
"MIT"
] | permissive | wffzxyl/rule_engine | f384a8b6691cbec6a75eb33f989caa53218c549c | 8874718fec629435c69ce360cd43a281da162627 | refs/heads/main | 2022-12-27T22:13:56.841146 | 2020-10-08T15:33:31 | 2020-10-08T15:33:31 | 300,490,707 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | condition.py | # coding: utf-8
"""
This interface represents a rule's condition.
"""
from abc import ABCMeta, abstractmethod
from .facts import Facts
class Condition(metaclass=ABCMeta):
@abstractmethod
def evaluate(self, facts: Facts) -> bool:
"""
Evaluate the condition according to the known facts.
... |
17b9b2a60b7184915a5b1257992c0ba21d8253c9 | 32bb2f933a919c38e7e0b1fe2d8565d566b3b202 | /layerstack/args.py | 1d15311a9692e0130cfb242f37161ae70b4c9dce | [
"BSD-2-Clause"
] | permissive | Smart-DS/layerstack | c62881c040b0b6162d121e7d2fb68d0406c793f7 | cfff69042c4f158fe0819802b80a8fa243662f66 | refs/heads/main | 2021-12-23T22:02:17.379794 | 2021-08-19T22:46:50 | 2021-08-19T22:46:50 | 118,175,588 | 3 | 0 | NOASSERTION | 2021-08-05T20:02:05 | 2018-01-19T20:34:16 | Python | UTF-8 | Python | false | false | 27,782 | py | args.py | """
layerstack.args
---------------
Classes that allow the specification of arguments that can be serialized to and
loaded from json, as well as expressed on the command line.
:copyright: (c) 2021, Alliance for Sustainable Energy, LLC
:license: BSD-3
"""
from collections import OrderedDict
from builtins import super
... |
1a8e755e137300e72ef918fbb2c907398ae424ba | 3ebe5c06ffd440e711ddfb73c86fc9e4f939fd0c | /api/app/game/routes.py | 8cb0e3b78e63cc1d7f20cf875f5a53b0cf478840 | [] | no_license | NiketanG/stone-paper-scissor-online | 0cb9dc9bca15838a780e38ed28d146038d09a664 | 237da254935ba26c9b8528b1e2945da0f092c4b8 | refs/heads/master | 2023-05-25T01:13:46.757813 | 2023-05-15T20:55:43 | 2023-05-15T20:55:43 | 260,986,802 | 4 | 0 | null | 2021-05-24T16:27:30 | 2020-05-03T17:45:07 | TypeScript | UTF-8 | Python | false | false | 5,408 | py | routes.py | from flask import render_template, Blueprint, request
from app.models import Game
from app import db, socketio
import json
import random
from flask_socketio import join_room, leave_room
game_blueprint = Blueprint('game', __name__)
@game_blueprint.route('/')
def index():
return render_template('index.html')
@game... |
d1e14ab16b37c29b33499bec2221967852e453c7 | de3130932f2a2e77adc82bafadc4525ff03e342f | /InstallAPS.py | 428837c59701a4ca5afb46c66c652667b7ab1f29 | [] | no_license | jordiortizlab/APS-One-touch | 44ca1672460c44185fa2b8c57add070294b01ee5 | 4b199304b7e6e7f249a223bf4c31807684e2b60f | refs/heads/master | 2023-02-11T04:26:57.094583 | 2020-06-25T08:10:38 | 2020-06-25T08:10:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,280 | py | InstallAPS.py | import common
import constants
from bf_sde import load_bf_sde_profile
from common import read_settings, get_selected_profile_name, \
get_sde_pkg_abs_path, get_bsp_pkg_abs_path, \
is_sim_profile_selected, get_switch_model_from_settings, \
validate_path_existence
from sal import load_sal_profile
from stratum ... |
d0c83062d15c3fdb07f3cce54accd05519a4bd7f | 2141cf10d9de24ce8153b8d33cd3c8d4918df117 | /projects/4_concordance/concordance.py | bee17cf2bd197e0ec80c2f194168df5089021872 | [] | no_license | Gomer1800/python_data_structures | c083ac88354c44a708794f51bf98cdd5d4a15436 | dd4e628dcd9c8e13378e2a69f4b7b287c2578035 | refs/heads/master | 2020-04-15T06:09:26.778474 | 2019-03-16T04:40:31 | 2019-03-16T04:40:31 | 164,450,478 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,885 | py | concordance.py | """
Luis Gomez
Python Data Structures
Concordance Generator. Uses a Quadratic Probing hash table to generate a
stop words table and concordance table. Stop words table MUST be loaded prior to
building concordance table.
This was a crazy project, so relieved
"""
from hash_quad import *
import string
class Concordanc... |
e892ccb6c8e17a677bac6da11f67c35a6821718d | c9b8c8ff924c154c7d198467506b38c49e048181 | /hw2datamining待續....py | e975a31ed3db854bbac0a292a5095765bebdcb31 | [] | no_license | empireisme/datamining | 17ca1fc3114ebc51e2cf84ec1feeba7965c8c9d0 | b8322e8a0fc5442a6d104bd4a371f18bab58b3bd | refs/heads/master | 2020-04-01T14:02:16.551807 | 2018-11-14T08:40:50 | 2018-11-14T08:40:50 | 153,277,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,860 | py | hw2datamining待續....py | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 15 20:43:29 2018
@author: User
"""
import pandas as pd
from pandas import Series,DataFrame
df=pd.read_excel('C:\\Users\\User\\Documents\\GitHub\\datamining\\hw2data.xls')
df1=df.iloc[ 4914:6569 ,: ] #抽出了10月份到12月份的資料 但是使用目測法
dfNR0=df.replace('NR',0) #把NR用0來替換
# TE... |
d16f1526a82c69855863cdff0f3c05f11df3774a | b2cc2209ce6ff3dbb89dd34fe97b3b047a56736e | /month02/课程笔记/day11/test02.py | b010ebac720387d551fc79f4c9a795225bb3b08f | [] | no_license | Silencehxm2020/silence_study | e72018957c3f0880ac5cb3e5185c4ee6cf5fc666 | aa6929c5f09b88bfbf30c9f8d2cf3dd1507c8304 | refs/heads/master | 2022-04-20T18:01:04.993022 | 2020-04-17T08:07:16 | 2020-04-17T08:07:16 | 256,441,542 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 361 | py | test02.py | from socket import *
# 创建tcp套接字
tcp_socket = socket(AF_INET, SOCK_STREAM)
server_addr = ("192.168.40.130", 8888)
# 发起链接
tcp_socket.connect(server_addr)
# 收发消息
while True:
msg=input(">>")
tcp_socket.send(msg.encode())
if msg =="##":
break
data = tcp_socket.recv(20)
print(data.decode())
tcp_... |
1bff2056095cca2cc3aad8e4e05cced1ee2ecc36 | 08812a91b7d7db8f5e69c1d572f49735fbcb85b0 | /test_celery/run_tasks.py | 1e5d45baf7f48b40e3ec1db8b33f48e21c0c3c75 | [] | no_license | arianpasquali/scaleable-crawler-with-docker-cluster | 2b5d65a559165f938766e78e57e19194381c94d3 | 40e8267c0e8b5e7e7fa049740db3d5d9048de975 | refs/heads/master | 2020-03-27T22:10:33.506661 | 2018-09-06T17:13:02 | 2018-09-06T17:13:02 | 147,210,683 | 1 | 1 | null | 2018-09-03T13:44:09 | 2018-09-03T13:44:09 | null | UTF-8 | Python | false | false | 776 | py | run_tasks.py | from .tasks import longtime_add
import time
from pymongo import MongoClient
import sys
#3client = MongoClient('10.1.1.234', 27017) # change the ip and port to your mongo database's
client = MongoClient('database', 27017) # change the ip and port to your mongo database's
db = client["contamehistorias"]
collection = db[... |
6f223c15e829b5e3d415d45d520a0084dbf47a99 | c39edcde02440f4369d8ad903d54077bf075d496 | /GMSUtil.py | a5fa68d60f57531fea07e96e7da570738b6f3326 | [] | no_license | Ezequiel2013/rscan | 2c5683e1f34fb06afe0012394a21ab6c48879c34 | 91e4919f76229cb282b767769ccf8df77ac6ce11 | refs/heads/master | 2020-12-27T10:08:01.291824 | 2012-10-20T23:34:34 | 2012-10-20T23:34:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,472 | py | GMSUtil.py | #! /usr/local/bin/python3
## Author: Andrew Hoos
## File: GMSUtil.py
## Purpose: The purpose of this file is to parse the special groups in a GAMESS output file
## Right now this includes the DATA group and the VEC group
## Limitations: The input file must be a GAMESS input file prepared for execution with the geometr... |
2455d81dc0989791f9fbafd67129dbc61857a68d | e6b07262acf00d838590b5de67841940eb0426bd | /app_separated.py | c3adae0825496a3ee610f4fa7727dbd1d25eb8b5 | [] | no_license | HarishKumarNagarajan/VSCode-check | f5340dc48450c261ba01c96f268f01e0cad22111 | ec6f9d20444fa0b9a63c3ce83e959f552e75b743 | refs/heads/master | 2020-09-05T04:38:33.469511 | 2019-11-06T11:59:34 | 2019-11-06T11:59:34 | 219,984,895 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,086 | py | app_separated.py | from flask import Flask,render_template,request,redirect,url_for,session,g,jsonify
#from flask_session import Session
from Models import Content
from Models import Master
from Models import UsersM
from Models import Batch
from Database import config
from Database import Database
app = Flask(__name__)
app.secret_key =... |
fbb367638a8de09815f6625a9c510a8667245be6 | 41d23de79d8fd85d31955d9fac0b5228ffca2a29 | /day/7/bag_rules.py | cacf06c48c60e65bbc90f2a9f5e7c66f1873cd0e | [
"MIT"
] | permissive | philparkbot/advent2020 | 652d90e9d192bcd1c444e83516358d9836a1777b | e5ee7e0703ae82d4c773024e4289d7d37879af35 | refs/heads/main | 2023-02-21T16:42:39.065252 | 2021-01-04T00:42:51 | 2021-01-04T00:42:51 | 324,212,552 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,918 | py | bag_rules.py | #!/usr/bin/env python3
import re
'''
Example rules:
* light red bags contain 1 bright white bag, 2 muted yellow bags.
* dark orange bags contain 3 bright white bags, 4 muted yellow bags.
* bright white bags contain 1 shiny gold bag.
* muted yellow bags contain 2 shiny gold bags, 9 faded blue bags.
* shiny gold bags c... |
3de9d05a5800359e1ef385e0f8cd7bcf480569cd | 9b72de4f01c77b92ef23cf0433d7f806802bb419 | /Contests/JUNE20B - June Challenge 2020 Division 2/XYSTR - Chef and String/Chef and String.py | b3d33923c956002ac246ce4d8bbcebfdec67bd33 | [] | no_license | GitPistachio/Competitive-programming | ddffdbc447669a2f8ade6118dfe4981bae948669 | f8a73f5152b2016b1603a64b7037602d2ab2c06e | refs/heads/master | 2023-05-01T20:55:18.808645 | 2023-04-21T20:45:08 | 2023-04-21T20:45:08 | 167,733,575 | 8 | 4 | null | null | null | null | UTF-8 | Python | false | false | 908 | py | Chef and String.py | # Project name : CodeChef: XYSTR - Chef and String
# Link : https://www.codechef.com/JUNE20B/problems/XYSTR
# Try it on :
# Author : Wojciech Raszka
# E-mail : contact@gitpistachio.site
# Date created : 2020-06-05
# Description :
# Status : Accepted (33710676)
# Tags : python
# Co... |
ec79b57453c46e47f2c8f3d3393c6f410059d771 | aa89a68972b489264a299a56060632cb30c4dc7f | /Controller/Validator.py | a089fc6b735ba03b75accc75ea46ffb482b56ab5 | [] | no_license | balanalina/Grade-Management | 044008b048f0c5c814c9da8fc1242f7bcc65127a | 6872b36050514403969bc5095462e5e775faf927 | refs/heads/master | 2021-05-21T22:35:35.079579 | 2020-04-04T13:15:18 | 2020-04-04T13:15:18 | 252,834,606 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,688 | py | Validator.py | from Domain.Student import Student
from Domain.Assignment import Assignment
from Domain.Grade import Grade
from Controller.Excep import myException
class Validator:
def __init__(self,c1,c2 = None,c3 = None):
self._c1 = c1
self._c2 = c2
self._c3 = c3
def studentValidator(self):
... |
c771a0d6c10a081d8ab08b3832d459b1aa32f512 | 2c9c607e1033e241dcda00362af67249441046d8 | /face_recognition/database.py | 88dbb11ba17ed61fefebb94ad5f267c0ce447801 | [] | no_license | dhiraj262/face_detection-using-opencv | 1ab33e4d5b7c9acbaef795347151cb17238e3630 | 933fb2e7e2851ee75a84305e6b4841cff090b6b7 | refs/heads/master | 2020-04-16T07:59:38.139298 | 2019-01-12T16:52:29 | 2019-01-12T16:52:29 | 165,407,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | database.py | import sqlite3
'''
Steps:
1. Connect to a database
2. Create a cursor object
3. Write an SQL query
4. Commit changes
5. Close database connection
'''
conn = sqlite3.connect('database.db')
c = conn.cursor()
sql = '''
CREATE TABLE IF NOT EXISTS users (
id integer unique primary key autoincrement,
... |
523cfea2aa9fcffa49ebb60172d5870a3e882619 | 9f6b3c7dc24a4f0675d716443a186363e014095c | /apps/dashboard/views.py | ea48a38c38bd0d851a65a50b24c5e4528fe3003e | [] | no_license | jwpowers2/ud | 6943b712af5b9614aa7b33aec4bfb4622f09e43c | 2d06c424e1f8d1d96fc8f699fcf0ee581b00b103 | refs/heads/master | 2021-04-15T05:45:52.171641 | 2018-03-26T12:32:49 | 2018-03-26T12:32:49 | 126,534,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,777 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import messages
from django.shortcuts import render,redirect
from django.apps import apps
Users = apps.get_model('login', 'Users')
Messages = apps.get_model('login', 'Messages')
Comments = apps.get_model('login', 'Comments')
USER_LEV... |
3c2ba27677be6175dd39135cdea88e0e95fb0885 | 99fa76dba4ee9a84c4cf76c1b1178da974f545d9 | /CommonLib/src/kmxGeneral/rename_seq.py | 51bc93306cb14f03ce3ec0654bd00736ac87501e | [] | no_license | chemberlen/our-py-lib | 4bcddeaa2ffa51eb4d0abc321e4b7d86b5d2c4b0 | 0cecf1a0197a037ed6193ffe65bdb6f2aafb5f65 | refs/heads/master | 2021-04-28T07:40:20.707328 | 2017-06-14T02:34:53 | 2017-06-14T02:34:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,385 | py | rename_seq.py | __author__ = 'lkumaresan'
import os
import shutil
def doRename(arg):
if len(arg)==3:
filePath = arg[0] if len(arg)>0 else ''
oldName = arg[1] if len(arg)>1 else ''
newName = arg[2] if len(arg)>2 else ''
filePath = os.path.normpath(filePath)
if not os.path.exist... |
16e9f2ace886005ab4a46ab1d62aaef0e14721c9 | bfff4c082d8915b9f39c27a7bbac2ebfb22be644 | /e_commerce.py | 5a2abd9847a4a4dfed88c59ebcae29003a6db9f2 | [] | no_license | marc7666/Virtual-Assistent | 769b867f885558c86b0a2f77409989a965d6a77b | 6fab227259c001fe51fd41554344bf3ad6dab71e | refs/heads/main | 2023-08-25T17:33:12.232798 | 2021-09-30T19:50:14 | 2021-09-30T19:50:14 | 386,643,643 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 483 | py | e_commerce.py | """
Allegation of e-commerce and online fraud file
"""
import urllib
import colors
def web_fraud():
"""
This function prints the link of the tax agency to pay the complaint
"""
print(colors.Color.BLUE + "Allegation of e-commerce and online fraud" + colors.Color.END)
commerce_fraud = urllib.parse.... |
5776ae7b728c2e60ac1d8f393d7c1e2c700f773c | 7534b54a007dc0aeb997f6e5c4e5455b7be31eae | /SPOJ/10232.py | 6054e5ce4aff9cfbc3c975be389cb9983c606d6f | [] | no_license | rishirajsinghjhelumi/Coding-Templates | 7708023c990dbaedd4e07fcfc5964a6632b60cbf | 8085bbf343e99daa27af392923c81a266a36fe6d | refs/heads/master | 2021-01-10T18:59:50.830519 | 2013-08-16T13:40:23 | 2013-08-16T13:40:23 | 11,998,810 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 139 | py | 10232.py | count = 0
i = 2
while i!=40000:
x=raw_input().split()
if len(x)==len(set(x))and len(set(x))>=3:
print i
count +=1
i +=1
print count
|
be94ed12bbc0377873a0789abe23413d0758b99f | 3e1a1cc84728ccd2d8197656df628527d0cffa4a | /main.py | fb81db6f40f5b9fe1a1838e323201777d12f179d | [] | no_license | tirumala18/Text-Editor | fa4edf2f8a860e4a4d6360f1409a7a03d2494f5f | b74bcc735ad1213978dae19bebe51584fe0a3d43 | refs/heads/main | 2023-08-24T23:06:56.637280 | 2021-10-31T14:40:38 | 2021-10-31T14:40:38 | 423,103,681 | 0 | 0 | null | 2021-10-31T09:26:42 | 2021-10-31T09:26:41 | null | UTF-8 | Python | false | false | 7,298 | py | main.py | import tkinter as tk #tk is a class in tkinter
from tkinter import ttk
from tkinter import font,colorchooser,filedialog,messagebox
import os
main_application=tk.Tk()
#tk is alias of tkinter
# main_application is object
# Tk is class in tkinter
main_application.geometry('1200x800')
main_application.title('Text Edito... |
597f129321d67fd835c1206dce2a13df31e2ef78 | 16bd2a8b28fd150e56b5c0b78956f56f55c82b1c | /polls/serializers.py | fc862a663455d80d44c9b91b00b65741948a8160 | [
"MIT"
] | permissive | vowatchka/fabrique_test_task | dfcb9552b5d30e5ffa34d53c49a8c31b4e72a72f | a876321c8c3c3197ce692f247af973432ebf84cf | refs/heads/main | 2023-08-16T11:27:02.292893 | 2021-10-17T18:47:04 | 2021-10-17T18:47:04 | 417,549,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,048 | py | serializers.py | from rest_framework import serializers
from .models import Poll, Question, Choice, Answer
class ChoiceSerializer(serializers.ModelSerializer):
class Meta:
model = Choice
fields = ("id", "choice_text", "question")
def validate_question(self, question):
if question.question_type == "te... |
bd4ff09158303496216ba60496f855b77bec54b2 | cdab20971d99fcf94b414e1060ffb15b6e60d821 | /test/recursive.py | f763fc8c427ce9afcbd81233ea9777a54ca55913 | [] | no_license | florommel/ara | d27f60b2334bc03fb711dec5722c324a20eb2be9 | 0b0dac6083af10134dccd23db426a354c054a9ba | refs/heads/main | 2023-04-21T10:29:17.084071 | 2021-05-03T13:47:29 | 2021-05-03T13:47:29 | 363,943,723 | 0 | 0 | null | 2021-05-03T13:45:05 | 2021-05-03T13:45:05 | null | UTF-8 | Python | false | false | 659 | py | recursive.py | #!/usr/bin/env python3.6
import json
# Note: init_test must be imported first
from init_test import init_test, fail_if
from ara.graph import CFType
def main():
"""Test for correct recursive function deptection."""
config = {"steps": ["RecursiveFunctions"]}
m_graph, data, _ = init_test(extra_config=config... |
47f7e5451ff40aeb6a5e2c5ab5c437968f5c85e3 | 84d130a0566486a28724b02dcaccb3b424c3b520 | /vim/models.py | 81a7b8eb056028b970beac92f7091a7a2923dd82 | [] | no_license | Wingie/Django-BBone | 1422dac2e379356a793775776e4d424348d6ffe3 | a21688ff1107c7cb51ede73610b174919eb66956 | refs/heads/master | 2020-03-31T08:32:45.825173 | 2013-03-26T11:43:29 | 2013-03-26T11:43:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 492 | py | models.py | from django.db import models
# Create your models here.
class VimeoUser(models.Model):
display_name = models.CharField(max_length=256,default="")
user_name = models.CharField(max_length=256,default="")
page_url = models.URLField(max_length=256,default="http://")
is_pay = models.BooleanField(default=Fa... |
dad4bfb1dbe2453df39801a608c1246bbe50ed7b | 942f3f319c723d8f750fcf6977c63d24acc4d206 | /second_max.py | 9f5a0683139cada1876f6eec59e114fdf218648f | [] | no_license | jyoti140220/python_list_ | 71ab7c39a0254876a80b194b8f73109f38a7b8e6 | 1cfc90d403b9b915179ef90b0d70750959f2d740 | refs/heads/master | 2023-02-27T13:41:40.104459 | 2021-02-04T11:52:15 | 2021-02-04T11:52:15 | 309,925,234 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 287 | py | second_max.py | second_max n=[90,78,56,89,102,91]
i=0
max=0
s_max=0
while i<len(n):
if n[i]>max:
max=n[i]
i=i+1
if i==len(n):
j=0
while j<len(n):
if n[j]<max and n[j]>s_max:
s_max=n[j]
j=j+1
print(s_max) |
798ace8b932d8b4d8454212660094ae97197b0bc | 652bd7750d636d7ba5a97ed1c5f76f0b402cacac | /health-app-backend/app/migrations/0001_initial.py | 750cae560944c80730edbc966f8b27bcafaba83f | [] | no_license | ianevangelista/health-app | 5fac4e6d0a1f3fd6ff44112e9af8b848fdebadc1 | ebe9ab57b8849e55969886e010c8c890553c190e | refs/heads/master | 2022-12-30T14:05:20.926341 | 2020-10-22T15:24:56 | 2020-10-22T15:24:56 | 303,822,824 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 585 | py | 0001_initial.py | # Generated by Django 3.1.2 on 2020-10-15 18:56
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Weight',
fields=[
('id', models.AutoField(a... |
d5f7aeff310319ccb56e7e22419d879772795f15 | d3d511e802925b19d4e79a8d9014eda7acd0321f | /flask_app.py | f543b719a1d489fef3ef61f902688eae55f36135 | [
"MIT"
] | permissive | kotnik/zair | d50e969c31a3557906b58d88a3125c68025e61ed | bb98635b20f798f8e1e353a20ce96f7bc03a3a88 | refs/heads/master | 2021-01-25T04:02:25.861097 | 2014-09-28T15:42:17 | 2014-09-28T15:42:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 530 | py | flask_app.py | from flask import Flask
def make_app(app_name):
app = Flask(app_name)
# Load configuration.
# conf_file = os.environ.get("CONFIG", None)
# if not conf_file:
# raise Exception("Missing CONFIG environment variable with the configuration")
# app.config.from_pyfile(conf_file)
app.config.fr... |
99cef095effb578373c90502b8bfa7942bf39882 | 77fdcf21efd1ba424e5afc1e9e99be8510978e6f | /setup.py | be905ae14639f8947c1b1d2b84b4cdcfe75dec82 | [] | no_license | lbusoni/epidemic_models | 0c9c077dfcf4e15fa04eb87a956eefc14aa356e3 | 8862f8172797be9effeb0a20f44ccd6c49fa6462 | refs/heads/master | 2021-09-23T15:01:58.635362 | 2021-09-16T14:50:49 | 2021-09-16T14:50:49 | 245,377,825 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 936 | py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(name='epidemic_models',
description='A simple tool to understand SARS, CoVid etc',
version='0.2',
classifiers=['Development Status :: 4 - Beta',
'Operating System :: POSIX :: Linux',
'Programming Language :... |
b148307b5d42f9021fa45820c0ae5f87980087a1 | fc2cad02892c1619a89a0f99a9ff2baefc992bf4 | /Daily-Algo/2020-09-09/공통조상/김민정_공통조상.py | 9aa5c3f9bd4a3ac9f2d9383e977788e25434e350 | [] | no_license | SEOULVING-C1UB/Daily-Algorithm | e95254c461269511316d351ac5108d4a8211fde7 | 3186e66a6ba630ffcbcf056be469fd89dc924cc8 | refs/heads/master | 2023-02-09T05:42:21.512296 | 2021-01-07T08:15:14 | 2021-01-07T08:15:14 | 290,989,446 | 0 | 19 | null | 2021-01-07T08:15:15 | 2020-08-28T08:11:48 | Python | UTF-8 | Python | false | false | 2,617 | py | 김민정_공통조상.py | def finder(s) : # 트리에서 부모의 부모를 물고 올라가는 형식. 조상들을 parents에 append
if tree[s][2] == 0 : # 다음 부모 값이 0일 경우, 최상위 노드기 때문에
parents.append(s) # 조상리스트에 넣고, 함수 종료
return
else : # 다음 부모 값이 존재 할 경우
parents.append(s) # 조상 리스트에 넣고
finder(tree[s][2]) # 해당 부모 값으로 재귀함수... |
38d7a62d9c355614ca728385c92a3f8c9f0d7920 | 8e0569c2974a59c09296ac958495839ae757e702 | /scripts/india/geo/districts.py | 8652dd0c101fcbc577acf52c278b7b2d02d83a74 | [
"Apache-2.0"
] | permissive | Ghaiyur-wipro/data | b648dfcf70e0a310becdf678466761c5eb4e76d0 | 615cc10bbee274d888c1bc58a78ffc93d424861c | refs/heads/master | 2023-08-20T10:35:33.022521 | 2021-10-02T02:00:58 | 2021-10-02T02:00:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,634 | py | districts.py | # Copyright 2021 Google LLC
#
# 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... |
dc837912ca7045107393747a63623caa173c4460 | 76479270f036f5b26804e18328596852533c85b7 | /Lochan_jupyter/all_in_one.py | ddb9b4422a6d5236e604024395e6baa8e771a351 | [] | no_license | ofsinnovation/dms-mask-extraction | c60dc611acb9cb704a40ced21971111a1006d5e4 | 9243d51e44b9d7298c7fe8867b3e7e8482cbdfb4 | refs/heads/master | 2022-12-12T17:15:28.312613 | 2019-08-01T10:54:44 | 2019-08-01T10:54:44 | 199,419,644 | 1 | 0 | null | 2022-11-22T02:57:32 | 2019-07-29T09:16:13 | Jupyter Notebook | UTF-8 | Python | false | false | 11,815 | py | all_in_one.py | # Create a CPU instance for inference, using Mask-RCNN library, make a snapshot of the same
# Create a flask wrapper around them to hit it with images (which will be base64 encoded), than it returns a json
# with bbox and rois
# Implement the below mentioned class write down init fn to use them all
# Test classifica... |
1e6019134f99434e89ba5f50bd587b193cbcca25 | d2f986b7a8d5b23e1e9feab90455e2cfdb0b2d14 | /app.py | bfb5ef0afc38f27413f8f707259563a0d0ea3e04 | [] | no_license | Ash066/uncle-vesemirs-kitchen | b2406d1bcdce9b9a6a43de610f135a7fa418eebb | a573d09b95831be21f456816a6e12f85de663352 | refs/heads/master | 2023-03-04T23:53:57.528323 | 2021-02-16T10:01:55 | 2021-02-16T10:01:55 | 334,905,214 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,017 | py | app.py | import os
from flask import (
Flask, flash, render_template,
redirect, request, session, url_for)
from flask_pymongo import PyMongo
from bson.objectid import ObjectId
from werkzeug.security import generate_password_hash, check_password_hash
if os.path.exists("env.py"):
import env
app = Flask(__name__)
ap... |
b7e1337839bf99b9f04af419eea6bda89cc65db0 | 29da2ca6def1270be13a3096685a8e5d82828dff | /CIM14/IEC61968/Metering/__init__.py | bd7be8fca5a2177f5a856cf953f05e7dcb562245 | [
"MIT"
] | permissive | rimbendhaou/PyCIM | 75eb3bcd3729b2410c03f3d5c66d6f1e05e21df3 | d578bb0bf1af344342bd23344385ed9c06c2d0ee | refs/heads/master | 2022-04-28T01:16:12.673867 | 2020-04-16T02:19:09 | 2020-04-16T02:19:09 | 256,085,381 | 0 | 0 | MIT | 2020-04-16T02:15:20 | 2020-04-16T02:08:14 | null | UTF-8 | Python | false | false | 3,202 | py | __init__.py | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... |
28349cbac8d35aaba591a4b46cbf48a385ca4588 | 5c0c0176db0ccf2c24b6b5ed459a8dc144518b13 | /examples/nas/cream/lib/models/structures/supernet.py | ea09377eb51030a4a7d435f3764862275345bcfd | [
"MIT"
] | permissive | petuum/nni | ac4f4a1c4d6df71684eeffa127b7c4858fd29e97 | 8134be6269902939232482d63649c06f9864be6d | refs/heads/master | 2023-02-18T11:21:41.078889 | 2021-01-20T03:21:50 | 2021-01-20T03:21:50 | 302,736,456 | 4 | 3 | MIT | 2020-11-20T20:21:15 | 2020-10-09T19:34:11 | Python | UTF-8 | Python | false | false | 6,569 | py | supernet.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Written by Hao Du and Houwen Peng
# email: haodu8-c@my.cityu.edu.hk and houwen.peng@microsoft.com
from lib.utils.builder_util import *
from lib.utils.search_structure_supernet import *
from lib.models.builders.build_supernet import *
from lib.u... |
618f06011204ea743ca3377d44f502ff5becb867 | 94eaa22296684d7b09266722da2971e88620c048 | /core/log.py | 6e0d39e2bb0b024a85aad127b02701be879ca0c4 | [
"MIT"
] | permissive | Kylmakalle/assistant-bot | aad1492812d21133dd9f2f3de67e12da399f1bbb | acaa84b5e3956d98a4b5ea344ac4fc415bf73c77 | refs/heads/master | 2023-04-05T04:27:44.391333 | 2022-10-05T20:20:30 | 2022-10-05T20:20:30 | 173,649,635 | 5 | 5 | null | 2023-03-21T22:43:53 | 2019-03-04T00:58:53 | Python | UTF-8 | Python | false | false | 2,211 | py | log.py | from aiogram.utils.markdown import hbold, hlink
from core.config import log_channel
from core.misc import bot
from modules.voteban.views import screen_name
import logging
def form_log(chat: dict, user: dict, event: str, message_id: int = None, admin: dict = None, **kwargs):
text = f'#{event.upper().replace("-", ... |
21198e1bf3b31d5bd076dc1906aa149a35d6eb82 | c9d4435c3fad19440fd318943fc63b7e401ea7c0 | /matching.py | 9b7cb0c3cff1d45c8ca54bc0059a3a8213821f33 | [] | no_license | luke-truitt/dsg-matching | 73b111d5d98a32ac7a14d0220480f629a9a7fce1 | 908a364958c5bebec8be2733d0f1f9c6b2881a8e | refs/heads/master | 2022-09-02T03:42:58.683132 | 2020-05-24T04:39:16 | 2020-05-24T04:39:16 | 266,359,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,078 | py | matching.py | import pandas as pd
import numpy as np
import csv
import datetime
def get_common_identities(row):
common = row['Q47'].split(',')
common_qs = []
if 'None' in common:
return []
if 'Ability Status' in common:
common_qs.append('Q41')
if 'Ethnicity/Race' in common:
common_qs.app... |
de5a9fe6c80552821cc58ab9a2a2d03f43274044 | f9cd56c2ec6bd2a4232dfc94e5deebe5d98c783f | /file-2.py | 63dcaa73ec8aed6653bd1a72850a31df341efdb4 | [] | no_license | thing22-lamblet/udemy-python | 08413f0d31626ca3943a601d8fb0ed9bf8450a0c | 8ec0e9a9aa90fbb13964839597dbcc1c584a0b27 | refs/heads/master | 2023-07-16T18:15:30.543959 | 2021-08-13T18:58:51 | 2021-08-13T18:58:51 | 361,028,560 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 97 | py | file-2.py | #!python_3.8
smell = open("file-3.py","r")
smell_2 = smell.read()
print(smell_2)
smell.close()
|
bf3d67b00cb3d8ee88e3cfb56ca80055fe3f8ea0 | b5172a8f62f69ce8044b5bc42ca46b0549a304bf | /src/Client_C.py | 1ff7bfc9f3242873bf8a09526af0413c8ad5128f | [] | no_license | bkeithturner/CyberProject | f652b2370baaa649e036909559321f11c1e0484e | ea87a094c75e83666b5622d1013ea45bfae38025 | refs/heads/master | 2022-06-16T08:22:48.228832 | 2020-05-07T21:38:06 | 2020-05-07T21:38:06 | 261,610,518 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,393 | py | Client_C.py | '''# Imports
from Crypto.Cipher import PKCS1_OAEP
from Crypto.PublicKey import RSA
from binascii import hexlify
import socket
# The message to be encrypted
message = b'Public and Private keys encryption Client C'
# Generating private key (RsaKey object) of key length of 1024 bits
client_c_private_key = RSA.generate(1... |
a30e0f891eb7ffc9193aa2bc6638f41bb715eb34 | 5e4f4fa25a243504da44660ef35f9a81a0e80c8c | /src/ResCompare/ResCompare.py | 1cce671ac8417b73eff12fc08646d5e7d07a4aaa | [] | no_license | JalonJia/NormingWork | dc7a676e36d1f0adad0015475960a562f138e6f8 | 45065fd844e92d1e9c0c61dbf7a13cc3a9392803 | refs/heads/master | 2022-04-27T06:47:12.382995 | 2022-04-24T07:57:31 | 2022-04-24T07:57:31 | 147,275,556 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,003 | py | ResCompare.py | import os
import os.path
from os.path import join #这样引入之后,join就可以直接使用了
import shutil
import xlwt #安装包:pip install xlwt
from datetime import date,datetime
import copy
'''
TODO: 使用Resource Hacker将RES文件中的字符串提取出来生成rc文件
'''
#os.chdir(s_runner_home)
class ResourceString:
'''
每条资源对应的数据结构,前面是ID,后面是字符串
'''
d... |
1e47668e469ce9534401d3647b0974083a63d906 | dd1aeefa5d7fcdf79098c781a14c198c80047f02 | /Python3 Tutorials/5_DataStructures/dict.py | 9a6402bc4b9e7dd266600fd05d2c5cd73f021a2a | [] | no_license | jojyjoseph/python_codes | 3e406c98ba17d8c4833887978a54ea46dd2b1671 | cbac514bcc6afec60b31eeafb3ff9e0cd556d4e7 | refs/heads/master | 2021-09-08T09:40:41.688172 | 2020-07-21T06:21:17 | 2020-07-21T06:21:17 | 220,240,777 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,774 | py | dict.py | #create a new dictionary/map
tel={'jack' : 4098 , 'sape' : 4139}
print("\nKey Jack, value : " + str(tel['jack']) )
#add a new key-value pair
tel['guido']=4127
print("\n\'guide\' added with key value " + str(tel['guido']))
#print the map
print(tel)
#delete an entry
del tel['sape']
print("\nDeleting entry for \'sape\... |
d52da1035d6e90916839883bc04847bddab562c8 | 60d6b8501d0be546437b26a6ee1f9fab97ec3897 | /platypush/plugins/switchbot/_constants.py | e219d54bff791d54f4152d97d33eab7368e344c6 | [
"MIT"
] | permissive | BlackLight/platypush | 68284a85b2f9eef303d26b04530f075927b5834a | 446bc2f67493d3554c5422242ff91d5b5c76d78a | refs/heads/master | 2023-08-31T21:01:53.519960 | 2023-08-29T22:05:38 | 2023-08-29T22:05:38 | 109,421,017 | 265 | 25 | MIT | 2023-09-01T23:15:49 | 2017-11-03T16:56:24 | Python | UTF-8 | Python | false | false | 838 | py | _constants.py | from enum import Enum
class DeviceType(Enum):
"""
Constants used for the `device_type` attribute.
Reference: https://github.com/OpenWonderLabs/SwitchBotAPI
"""
BLIND_TILT = 'Blind Tilt'
BOT = 'Bot'
CEILING_LIGHT = 'Ceiling Light'
CEILING_LIGHT_PRO = 'Ceiling Light Pro'
COLOR_BULB... |
a9ce85bc7eafd7d7b6f7df966e73f8db55a002f4 | a0447b03ad89a41a5c2e2073e32aeaf4d6279340 | /ironic/conf/sensor_data.py | 8527113a672843a19d4db17478b52d011e409398 | [
"Apache-2.0"
] | permissive | openstack/ironic | 2ae87e36d7a62d44b7ed62cad4e2e294d48e061b | ab76ff12e1c3c2208455e917f1a40d4000b4e990 | refs/heads/master | 2023-08-31T11:08:34.486456 | 2023-08-31T04:45:05 | 2023-08-31T04:45:05 | 10,066,301 | 411 | 365 | Apache-2.0 | 2023-07-25T02:05:53 | 2013-05-14T22:28:24 | Python | UTF-8 | Python | false | false | 4,426 | py | sensor_data.py | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... |
ce70099ac2e1148d33f5dd0506b8bc1ed177f906 | 4cf81c84dc9ca59f6f7d7cd8d5903f6b990f748f | /coffee_machine_stage6.py | f10f900b9d82fcef2778d0a38a56bf574b9ba89a | [] | no_license | arcorin/hyperskill-coffee-machine | 269501628c7dc3f04a8ad378071adc4b7c8ad355 | ecbd5d20502b8b22324071a05e6f38df5067798d | refs/heads/master | 2022-09-26T10:50:40.148023 | 2020-06-04T10:35:15 | 2020-06-04T10:35:15 | 269,327,950 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,316 | py | coffee_machine_stage6.py | # CoffeeMachine
# Stage 6/6: Brush up code
class CoffeeMachine():
supplies_names_long = ["ml of water",
"ml of milk",
"grams of coffee beans",
"disposable cups of coffee"]
supplies_names_short = ["water",
... |
395807ddc18a3afacd54c67e95f4cd4f756f9eb5 | e8561aa0dc9970b838666ae83eef9b80ebaef841 | /server/apigw/apigw.py | 261070db199d2555d34f793d2adde471a2bbaf41 | [
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | Hirosaji/bert | aacecce2cd32b33a63dfe5a93cc21ca68603a4cf | 74b9d39044c4123e0851e7adc1d5182a0d720a3b | refs/heads/master | 2020-12-19T05:20:13.432756 | 2020-01-27T07:13:07 | 2020-01-27T07:13:07 | 235,631,541 | 0 | 0 | Apache-2.0 | 2020-01-22T17:53:45 | 2020-01-22T17:53:44 | null | UTF-8 | Python | false | false | 1,120 | py | apigw.py | import requests_oauthlib
from oauthlib.oauth2 import BackendApplicationClient
from settings import (
APIGW,
)
def get_apigw_client(client_id, client_secret):
"""get token and client
Args:
client_id (str): apigateway clinent id
client_secret (str): apigateway clinent secret
Returns:
... |
239a991c7b21b0b6869094ae2baf89e80854b09a | 44fa46db97002c265e2b60689bfe1c893a020696 | /pe27.py | aa09f4626064f7283c45ecec597fc7258b413a33 | [] | no_license | devm33/project_euler | 1fa76f8871aae48119734aaca111f13ee55cf729 | 64ed336f4b87caf6ea9e355e4d03423df8dd81c0 | refs/heads/master | 2021-01-18T22:55:44.289453 | 2016-07-31T15:54:49 | 2016-07-31T15:54:49 | 27,347,046 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 639 | py | pe27.py | #!/usr/bin/env python2.7
# find n*n + a*n + b where |a| < 1000 and |b| < 1000
n = 10 ** 6
is_prime = [True] * n
is_prime[0] = False
is_prime[1] = False
for i in range(2, n):
if is_prime[i]:
for j in range(2 * i, n, i):
is_prime[j] = False
def how_many_primes(a, b):
n = 0
cur = b
... |
74de13c138c91af80b603315a0f89313b869be33 | ffda285c59a461b2456d2d05f5aed5d315af3262 | /team/forms.py | fef69f0c9b0d1bcc97820a9e48bfdb67b23fa2af | [] | no_license | Leonardo711/Stage | faa86ea73f50c55eae66474d5926880c4324b24b | 7d1e6b3cc7561a28bb541865382c500ee5a1c354 | refs/heads/master | 2020-07-03T09:00:40.542328 | 2016-11-30T13:04:04 | 2016-11-30T13:04:04 | 74,184,986 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | forms.py | from django import forms
from team.models import Member
class MemberForm(forms.ModelForm):
class Meta:
model = Member
fields = ('name', 'teamName', 'priority', 'profile')
widgets = {'name': forms.TextInput(),
"teamName":forms.TextInput(),
'profile':f... |
d5301c337c012ef1a52531f5dc9268c0b5c46552 | b5b5a969ec8fd15b1b88d6f2536e3d298589de13 | /taxii_service/taxii.py | 6302b55acd47190dfe3e2b6fd70386ca1020e02f | [
"MIT"
] | permissive | phate1/crits_services | 2314c51a73bd30b9802aff1d15d261181c211de1 | 88591715c225b703c28be6993d1bb1ca4deaf623 | refs/heads/master | 2020-08-05T07:26:41.105408 | 2019-10-02T21:43:42 | 2019-10-02T21:43:42 | 212,446,379 | 0 | 0 | null | 2019-10-02T21:38:54 | 2019-10-02T21:38:54 | null | UTF-8 | Python | false | false | 6,829 | py | taxii.py | from mongoengine import Document, StringField, ListField, BooleanField
from crits.core.crits_mongoengine import CritsDocument, CritsSchemaDocument
from crits.core.fields import CritsDateTimeField
from .migrate import migrate_taxii_content
class Taxii(CritsSchemaDocument, CritsDocument, Document):
"""TAXII Docume... |
97754ccc53f73ac077a72b24e8f0cb095cfa2941 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03287/s220973559.py | d6789861ef608a1e7f9673b7d986aea4a0f28492 | [] | 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 | 473 | py | s220973559.py | from sys import stdin
from itertools import accumulate
def main():
#入力
readline=stdin.readline
n,m=map(int,readline().split())
a=list(map(int,readline().split()))
d=dict()
for s in accumulate(a):
x=s%m
if x not in d:
d[x]=1
else:
d[x]+=1
if 0... |
dce6e198d5bbac40e837aff15fa179d0ceae5c6b | aaf9df2f15ec9bbfb7d98c2239db940117bc6762 | /Data-Structures/PA3/hash_substring/hash_substring.py | 52001988b167758c096fc68f2fde29cfee9c32d2 | [
"MIT"
] | permissive | ugaliguy/Data-Structures-and-Algorithms | db50a0f4b39908d17fa125ca70c0616f52d895d2 | 4bcbd1b0cff66f442a03d06393f654f8e3a61ded | refs/heads/master | 2021-01-21T14:08:42.127708 | 2016-07-04T00:43:38 | 2016-07-04T00:43:38 | 56,821,728 | 0 | 1 | null | 2016-07-04T00:43:39 | 2016-04-22T02:54:23 | Python | UTF-8 | Python | false | false | 1,203 | py | hash_substring.py | # python3
import random
p = 1000000007 #big prime
x = random.randint(1,p-1)
def read_input():
return (input().rstrip(), input().rstrip())
def print_occurrences(output):
print(' '.join(map(str, output)))
def precompute_hashes(text,pattern_length,pattern,x):
h = [0 for i in range(len(text)-... |
f6f2fc100c9ee0ac7257523850465ed4d55f606b | a97455fa33473f5f7ac4daa61b4779d10c84439f | /exam.py | 9b2bfc6993a09dd4810bfcba3633179f1f1ead10 | [
"MIT"
] | permissive | zambotn/softpython | cc616b524467a755cd6a26eda7a158dae20ff614 | e1383bf40b15889664792f8a931ef0104c4b1377 | refs/heads/master | 2021-04-28T17:24:37.184215 | 2018-02-16T16:20:27 | 2018-02-16T16:20:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,266 | py | exam.py | #!/usr/bin/python3
# David Leoni Sept 2017
# This script allows initialization and management of exams.
import conf
import sys
import os
import shutil
import datetime
import glob
import re
from arghandler import *
def fatal(msg, ex=None):
if ex == None:
exMsg = ""
else:
exMsg = " \n " + repr... |
8dc2c00cb49b64d9808abcec17621aaade10bac6 | 5d13f2dc56fb253b9d6e3a432259ded2e6eddac7 | /sagar_engine/agents.py | 1098eaf7cc8d404565ef9df7e08198f965d93a2a | [] | no_license | metterklume/robot-ludo | a655c651555508e0feab4fc95abe987fc823752c | 8da92fdb7d96c514969e025a5b0acbe001cc3bbd | refs/heads/main | 2023-01-14T14:04:09.398731 | 2020-11-20T06:50:27 | 2020-11-20T06:50:27 | 304,036,247 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,091 | py | agents.py | import random
import time
from itertools import count
from random import randint, choice
from .ludo_utils import getBestMove
import numpy as np
random.seed(0)
RED = 0
BLUE = 1
COLORS = {RED: "Red", BLUE: 'Blue'}
# AGENT ============================================================================================
cla... |
1a12da2262d543547c312115a9df144e37f62d0c | c2f320b696546e0e8ad4372ba40b3efa01920b33 | /bin_tree_diam.py | 2387195413135f5b48316273ba6569d5674dfab8 | [] | no_license | MatthewC221/Algorithms | e785f69533787326b791327381567a7bd15480a8 | b619498d2b8b5e53b629b664fabcff0b68c10897 | refs/heads/master | 2021-01-22T21:22:19.549119 | 2019-04-08T11:19:58 | 2019-04-08T11:19:58 | 85,416,771 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,329 | py | bin_tree_diam.py | # Leetcode: https://leetcode.com/problems/diameter-of-binary-tree/description/
# Slow as hell.. I think it's because of the constant recomputation of depth. We technically could merge
# maxDepth and depth into one function. This I believe will increase speeds greatly (it does, see commented)
# Definition for a binary ... |
1f21fa8f7b8a3e7c757011b8d19f3035a3504abf | 76f8858f9126288bd99bc1069376d9e2ed35d2b5 | /function_example.py | 046cdfa79677215b59fe777a57c4f75db9876fc1 | [] | no_license | abhay27chauhan/Python-concepts | 63b0c659c28b6bb09201d2d58926f98e075c8ef3 | e58b282f26d7a5b2d3f235c8cf8f75a8286069e4 | refs/heads/master | 2023-04-05T06:23:17.000219 | 2021-04-08T03:06:31 | 2021-04-08T03:06:31 | 326,024,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,189 | py | function_example.py | # Eg-1 -> calculate number of cans required to paint the wall
import math
def paint_calc(height, width, cover):
num_cans = (height * width) / cover
round_up_cans = math.ceil(num_cans)
print(f"You'll need {round_up_cans} cans of paint.")
test_h = int(input("Height of wall: "))
test_w = int(input("Width o... |
cd4fc8dbb33c326aa7d9bf9f8f5f8b945b47257a | 0157a8c79457fcef9b9f7512c7f37e35323b7e6a | /yolotrain.py | e2f6f69f9809ff9d93d90f694182099ec02a0b52 | [] | no_license | feizhouxiaozhu/PyTorch-YOLOv1-ongoing | 91932162e7fa2e324d80d220fb4a2e40acee751d | 7d500f65c5ff663583c2d23582cc6494c570c5be | refs/heads/master | 2020-06-12T08:03:57.192488 | 2019-06-01T15:49:27 | 2019-06-01T15:49:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,237 | py | yolotrain.py | # -*- coding: utf-8 -*-
# Train, backprop yolonet
__author = 'Lizzie'
import os
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.utils.data import DataLoader
from torchvision import models
import torchvision.transforms as transforms
from yolonet import YOLOnet
f... |
69171477d31b96672c11318595b2987050e67bb4 | 4bf3aaf77c309a489100b98a8c03532632df152c | /Python/BOJ/1063.py | ef6d78b748f1cdfbfd6ecddeaa003eb02034abef | [] | no_license | murane/PS | 7fbfc54d962231949efc67f1a35c4b0119de0780 | e938c6c503aeac08bf65e1e66709172b0e5da6ef | refs/heads/master | 2023-05-06T22:51:54.105811 | 2021-05-30T03:34:53 | 2021-05-30T03:34:53 | 293,699,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 812 | py | 1063.py | import sys
r=sys.stdin.readline
tmp=r().split()
king,stone,N=tmp[0],tmp[1],int(tmp[2])
chess=[[0]*8 for _ in range(8)]
#chess판에 king과 stone 배치
king=[8-int(king[1]), ord(king[0])-ord('A')]
stone=[8-int(stone[1]), ord(stone[0])-ord('A')]
tb={
'R':(0,1),'L':(0,-1),'B':(1,0),'T':(-1,0),
'RT':(-1,1),'LT':(-1,-1),'RB... |
875090ea156592d2ccce1b7ca07a2697ac4a2623 | fa7e3c3747ba5c14e968867b328933fc4ffa2f8a | /src/logger.py | f5a8a2e26d433cbd0b15e1f3f06be9d6c1e1bcb9 | [] | no_license | Ran4/argus | c31a92d84fad28d8d87aad8c36c289872684183d | 15717a9a4fd6c4fe05e6b75afabd68fa25ce4bd4 | refs/heads/master | 2016-09-05T10:56:16.521284 | 2015-05-21T19:18:10 | 2015-05-21T19:18:10 | 35,627,430 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 744 | py | logger.py | import time
defaultFileName = "../logs/log.log"
def writeToFile(s, fileName=defaultFileName, verbose=False,
timeStamp=False):
"""Appends a string s to a file...
"""
try:
with open(fileName, "a") as logFile:
if timeStamp:
timeStampString = time.strftime("%y%m%d_%H... |
993c3a9f8fc0cd47b3a6a20e1dfae654b44f7f9d | d125c002a6447c3f14022b786b07712a7f5b4974 | /tests/bugs/core_3233_test.py | 493fc9b53d3e460646e92b2f73b5243a83562f6b | [
"MIT"
] | permissive | FirebirdSQL/firebird-qa | 89d5b0035071f9f69d1c869997afff60c005fca9 | cae18186f8c31511a7f68248b20f03be2f0b97c6 | refs/heads/master | 2023-08-03T02:14:36.302876 | 2023-07-31T23:02:56 | 2023-07-31T23:02:56 | 295,681,819 | 3 | 2 | MIT | 2023-06-16T10:05:55 | 2020-09-15T09:41:22 | Python | UTF-8 | Python | false | false | 951 | py | core_3233_test.py | #coding:utf-8
"""
ID: issue-3605
ISSUE: 3605
TITLE: LIKE, STARTING and CONTAINING fail if second operand >= 32K
DESCRIPTION:
JIRA: CORE-3233
FBTEST: bugs.core_3233
"""
import pytest
from firebird.qa import *
init_script = """create table blobz (zin blob sub_type 1);
insert into blobz... |
bc095e255a0db0bab6022b3faa9b4427f6971465 | ab58a1bffa43c4d8179087cdf3d2c7bf5ecaca81 | /src/gccffi/cffimagic.py | d97625b8069beddad11b157da7f495476394a4c4 | [] | no_license | mincau/cooknotebook | 8a8e17a1cd1d0488dabe6a3f01de4e5153a247bc | 0f8f17ac78aa713b3577aaba63fbedcff2aaa679 | refs/heads/master | 2020-04-01T20:04:45.724576 | 2018-05-01T02:49:22 | 2018-05-01T02:49:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,518 | py | cffimagic.py | import hashlib
import sys
import os
from os import path
import time
import subprocess
import tempfile
import warnings
from IPython.core.magic import Magics, magics_class, cell_magic
from IPython.paths import get_ipython_cache_dir
from IPython.core import magic_arguments
import cffi
from pycparser import parse_file, c_a... |
3b2d7215622c5a33d78d738dcf1915c5962f0c96 | 654d2b74a8b4bb752866b3a399359063351ff073 | /app/mouse/builder/views/site_terminate.py | 705613e0958ed3c8344aa8b01bf0ca2b5a974526 | [] | no_license | YutoHayashi/web-hosting-app | 38ed9c3ec79d5bff495ad7bc84441915fb03b26d | 0f7a9cc9e09ef83064c5a58e9f617f84d07f06f6 | refs/heads/main | 2023-08-25T14:54:18.553144 | 2021-11-06T12:49:14 | 2021-11-06T12:49:14 | 400,734,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 951 | py | site_terminate.py | from django.http import Http404
from rest_framework import permissions, generics, status
from rest_framework.mixins import DestroyModelMixin
from rest_framework.response import Response
from builder.serializers import SiteSerializer
from builder.models import Site
from iam.permissions import IsOrganizationAdministrat... |
80d8973a4d7f01e339c0c560b272a7e1cc784eb1 | a4fe53a764085a989d046a2cf3f2d598a3e4a51d | /tuple.py | 720f38575d149d9ede95aaa44750bc5505f9f399 | [] | no_license | Tarang-1996/100-days- | 52e39db9702952de8a9a70700730f6921dd0a7ff | a6122f8f70b71ecf8c1eaa656f9819d8c4b4556a | refs/heads/master | 2020-03-22T10:55:48.637226 | 2019-05-27T16:34:28 | 2019-05-27T16:34:28 | 139,936,432 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | tuple.py | tuple=("Tarang Gupta","TCS",23,"Female");
tuple1=("Umang",24);
print(tuple);
print(tuple1);
print(tuple1+tuple)
print(tuple[2:])
print(tuple[0])
|