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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2b6ae3fc5b8aeb3fb1be6c43f8970921ba728023 | a0469e6b3db7c31075a49e44285382a477e73bed | /Johan scrips/TriggerV1_ECC_prep.py | 53d7424f9817224f1a896a005b257157dd3d8f66 | [] | no_license | fnahuelc/listen_and_trigger | 8578d9195773445f79234f283e4a30c127b53ac2 | cd16bb81bcb617aaf75e6a3a72002661808ca845 | refs/heads/master | 2020-03-28T01:25:09.345657 | 2018-09-04T14:36:54 | 2018-09-04T14:36:54 | 147,503,550 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,475 | py | TriggerV1_ECC_prep.py | import pyaudio
import struct
import math
import wave
INITIAL_TAP_THRESHOLD = 0.1
FORMAT = pyaudio.paInt24
SHORT_NORMALIZE = (1.0/32768.0)
CHANNELS = 1
RATE = 44100
CHUNK = 1024
INPUT_BLOCK_TIME = 0.0001
INPUT_FRAMES_PER_BLOCK = int(RATE*INPUT_BLOCK_TIME)
OVERSENSITIVE = 15.0/INPUT_BLOCK_TIME
U... |
29b922802a0261b295f88722c4de49b79b93bb19 | cb82812fc3eb1d657961b7953ba6c30234cc7545 | /모델 생성 과정 - 6.py | c5f71ac1b594c757ec21daa2bf12ba3e57c31015 | [] | no_license | jjh920923/card_project | ee5c76ce4d33280d18d83b8e7529c0b1749868c8 | a482681de62e9fe1cc8b7d87f4a632e10a882f41 | refs/heads/master | 2022-12-10T06:33:37.134381 | 2020-09-01T02:53:58 | 2020-09-01T02:53:58 | 291,874,464 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,201 | py | 모델 생성 과정 - 6.py | import os
import numpy as np
import pandas as pd
import seaborn as sns
import scikitplot as skplt
import matplotlib.pyplot as plt
from matplotlib import font_manager, rc
from sklearn.svm import SVC
from sklearn.naive_bayes import GaussianNB
from sklearn.tree import DecisionTreeClassifier
from sklearn.neural_network imp... |
1f7f1de2b213f10784f36be342cdbd7de97bee6c | 313d33c5c1702223cc7597b331a1228d6cf6f270 | /scheduling_test.py | b458157b31b7625d61d07e54bde6ddeb6db0f329 | [] | no_license | kartik-hegde/weight_sharing | fb4322db64e2357c5de5c268fb4bedd34504985a | 2dd4ec9b2638cfa62a900a4b54c2ab5a9a420c5f | refs/heads/master | 2021-09-07T07:59:01.238116 | 2018-02-19T20:07:12 | 2018-02-19T20:07:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,059 | py | scheduling_test.py | #!/usr/bin/env python3
import numpy as np
import random as rand
import operator
# R = 2
# C = 8
# NUM_VAL = 4 # number of possible weight value
# NUM_PE = 2 # number of PEs
R = 3
S = 3
C = 256
NUM_VAL = 71 # number of possible weight value
NUM_PE = 16 # number of PEs
ADD_COST = 1
MULT_COST = 20
TOTAL_WO... |
aae20cc6b1ff0249bb133797aa317329b3bc4de5 | f128ecd18dbd4868b496d1738ece9e68c9e32827 | /FinalWork/main.py | 693083c5546c9df640eb1847e4b676e69d06b302 | [
"MIT"
] | permissive | LIGHT1213/MySQL_Class | dfb326745316a79ae72956147ae9bb96f5aad039 | 4b88b4bdc882aad17c85b211abaeaf8933a232ec | refs/heads/master | 2022-09-18T20:48:01.476013 | 2020-06-05T02:15:00 | 2020-06-05T02:15:00 | 255,497,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 143 | py | main.py | from tkinter import *
import pymysql
import Login
import RecordAndSearch
global db
Login.UserLoginMain()
RecordAndSearch.RecordAndSearchMain()
|
9667b45e0ddfc74ef7c18164506c40ca3749915b | 866948421e7f22480da2bdf699c54220734e3a4b | /python/fun/fun/__init__.py | 4d5e539404ac29a6f853883809e311f23b630573 | [] | no_license | QinShelly/workspace | f0f5aba1280a1a112cf7df316b7857454338fb2d | 4734ec9e561c64bcbdb11e321163048c1c140f58 | refs/heads/master | 2020-07-06T21:49:25.249134 | 2020-02-08T07:34:34 | 2020-02-08T07:34:34 | 67,876,658 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 93 | py | __init__.py | import sys
sys.path.append('/usr/local/lib/python2.7/site-packages/requests-2.9.1-py2.7.egg') |
96d82885e8c080df1d03a98d6557fb4ba4212fcc | 191af9fee1131f9cd646a29a80bb8a875c70969c | /06 - WeatherPy/api_keys.py | 6f5d8d5d8790c09d4dc25476bd5c7fb481d0c26e | [] | no_license | peterhardy22/Data-Analytics-Projects | ec544c7a6e0bebd8f796c2c2c7155afe553b072c | 98b234b8daf71b08f9fc952fbf5c9afffd285101 | refs/heads/master | 2022-12-11T07:18:46.779673 | 2019-07-20T17:33:59 | 2019-07-20T17:33:59 | 172,261,859 | 4 | 0 | null | 2021-03-20T01:10:08 | 2019-02-23T20:42:27 | Jupyter Notebook | UTF-8 | Python | false | false | 70 | py | api_keys.py | # OpenWeatherMap API Key
api_key = '5c65f5efbe41769f1bbf62c86e8f9b07'
|
223b27b6acf66529f628093aea10e2635b4082a4 | 31fcfb26d4a286370a96c2b2287ae6770179c039 | /zadatak2/zad1.py | 24c7884396eb494dd1a3d7ae402cd949dd0288c1 | [] | no_license | GrubaZZ/Python-firstSteps | ca7e4eb19612ff5f786909955278ed2196e12081 | 12eceea45ce7802ca2942e2857e1e97f0feb31c7 | refs/heads/master | 2021-04-15T13:50:33.658688 | 2018-03-23T11:15:01 | 2018-03-23T11:15:01 | 126,327,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 584 | py | zad1.py | import random
import time
def insertionSort(alist):
for index in range(1,len(alist)):
key = alist[index]
position = index
while position>0 and alist[position-1]>key:
alist[position]=alist[position-1]
position = position-1
alist[position]=key
range(min, max), elements)
... |
c51ddeed39ad614e2f7eaf2542bf458dfacd29c8 | 0259ca9a5d8b162919405bf65c53fa392f6654e5 | /src/game/actions/__init__.py | 95ea8f51cdeee54a60f5f792d23e39188f50ca3f | [] | no_license | timothy-breitenfeldt/mtg-audio | bd7ffc55a65df3344f833a1e8f1dc8fd89bfd318 | 66af6f87ad0932575f8ae06f9086821ee61d1e29 | refs/heads/master | 2021-05-21T03:45:20.356505 | 2020-04-17T15:33:09 | 2020-04-17T15:33:09 | 252,527,666 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,854 | py | __init__.py |
from game.actions.addCounters import AddCounters
from game.actions.addMinus1Counters import AddMinus1Counters
from game.actions.addPlus1Counters import AddPlus1Counters
from game.actions.attackWithAllCreatures import AttackWithAllCreatures
from game.actions.attackWithCreatures import AttackWithCreatures
from game.acti... |
35bdf70e18669dfe6b58c6af9a034bbbc2f979c7 | 1289a06e42b25a784cf52530b9fd3f502793f407 | /src/demo0018/test.py | 054b1d60152e6108d8a1c611e648e922fcb68827 | [] | no_license | SUNFei1126/python_Demos | e21ffc9febc22e81156cda961c258741d5aeb5c4 | e7b962795c7ea9dd3b6e0129355bb8a9835f0ee5 | refs/heads/master | 2020-04-12T07:54:44.144270 | 2018-12-21T03:30:42 | 2018-12-21T03:30:42 | 162,374,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,301 | py | test.py | # coding=utf-8
#!/usr/bin/python3
'''
Created by sunyufei on 2018/12/21.
'''
'''
将 第 0015 题中的 city.xls 文件中的内容写到 city.xml 文件中,如下 所示:
<?xmlversion="1.0" encoding="UTF-8"?>
<root>
<cities>
<!--
城市信息
-->
{
"1" : "上海",
"2" : "北京",
"3" : "成都"
}
</cities>
</root>
'... |
407999a805a2b5d53c58183ab5b1203a036bcc2a | ce990caf3e29ae79796bd2675d2efa79567a711c | /stocket/analyse.py | dc4c3b205e8ee5395a8d154f9e00ab9c1419cb24 | [] | no_license | shichao1986/daily_exercise | 8531ad046178929d30c1030a2ac0e00aacbda9d6 | eeacbac58045339141296bd68d4a82796861fd1d | refs/heads/master | 2020-04-10T16:29:12.277994 | 2019-12-08T15:53:47 | 2019-12-08T15:53:47 | 161,146,833 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,660 | py | analyse.py | # -*- coding: utf-8 -*-
import models
import copy
import datetime
import tushare as ts
from sqlalchemy.sql import desc, asc
from sqlalchemy import func, or_, not_
db_session = None
def active_deal(code, date, start='', end=''):
if not start:
start = '09:30:00'
if not end:
end = '15:31:00'
... |
d859a3f463a1e4c8decd3e93c4beb0efe482cd28 | d9d34c6bec0063ce67aa5d431e9777db25155b9a | /bank_account.py | 5bd8bd10197917b1c3b3e8dc82aa84e24ae4ce63 | [] | no_license | rutujabhalchandra1/Python-Algorithms-and-Data-structures | f73b75d7d2cfcfd6944910a0af3a2174bc5e05f6 | 880e75aa76d16452f1171f3e97bb3a4eee804085 | refs/heads/master | 2020-06-28T02:36:22.077013 | 2019-08-01T21:48:16 | 2019-08-01T21:48:16 | 200,121,634 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 736 | py | bank_account.py | class Account():
def __init__(self, owner, balance):
self.owner = owner
self.balance = balance
def deposit(self, deposit_amount):
print("Added {} to account".format(deposit_amount))
self.balance += deposit_amount
def withdraw(self,withdraw_amount):
if withdraw_amoun... |
270a77feb6abcef7c4adc713b96d4e8534e8cc64 | 4f12100a5f1d99a67e2119724b4f23bd54e4df3b | /sistemaDePersonasWS/sistemaDePersonasWS/sistemaDePersonasWS/views.py | b501e7c4ea35f2ee816da92eb94e68124a7b375c | [] | no_license | javierperini/SistemaDePersonas | d6adc21528fd057a1a6580008589b146f27446f0 | 65537e03dd088117901eb470e7a1dbf3046c2bcf | refs/heads/master | 2020-03-16T13:06:46.727122 | 2018-05-10T03:37:16 | 2018-05-13T23:41:57 | 132,681,642 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,537 | py | views.py | from django.views.generic import TemplateView, CreateView, UpdateView
from sistemaDePersonasApp.models import Person, PersonImages
from sistemaDePersonasWS.forms import PersonForm
from django.http import JsonResponse, HttpResponseForbidden
from django.core.urlresolvers import reverse
from django.contrib import messages... |
fa65f7513113dc55ff7a3c1e805e3348030654e3 | 3399f1307c16dfcb1fec2203960b98e1216a7804 | /hashtek.py | dbcbf51f80ab3f5eaced61492ec4f0da76b803cc | [] | no_license | SORDAS-R/blockchain | d0237298cf7f3437a36cca84dcb1212c901d6ee7 | 12b3b9c2bba12c8c6f1d83053b7281bcc01e14f6 | refs/heads/main | 2023-07-13T09:16:07.612272 | 2021-08-20T19:25:05 | 2021-08-20T19:25:05 | 398,379,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,421 | py | hashtek.py | import datetime
import json
#da block
class Block:
nonce = 0
block_num = 0
prev_hash = 0x0
next_block = None
data = None
hash = None
time_stamp = datatime.datetime. now()
def __init__(self, data):
self.data = data
def hash(self):
h = hashlib.sha384()... |
03e345cc8d6d5872be75f1c8c9f573299cff72d1 | cd477305d0e2e3eb8f6a71b3b6b0b4f5e0b176ff | /Analysis/altitude_analysis.py | b158b420d03807cc3329caf138b8cf1dd54b51b8 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | tcarmelveilleux/IcarusAltimeter | 55f69b2bacb036f3cffc47e9a9c48e7e667cfdac | a2aee99d8a451c7099dabd212e6461acb0784278 | refs/heads/master | 2021-01-20T03:34:09.485714 | 2018-03-07T20:38:34 | 2018-03-07T20:38:34 | 33,037,552 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,202 | py | altitude_analysis.py | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 14 19:34:31 2015
@author: Tennessee
"""
import numpy as np
import matplotlib.pyplot as plt
def altitude(atm_hpa, sea_level_hpa):
return 44330 * (1.0 - np.power(atm_hpa / sea_level_hpa, 0.1903))
def plot_alt():
default_msl = 101300.0
pressure = np.l... |
454eeea184a2aed32c1357c879b370015888d358 | c84124838d63fc7b11bd636113b30fb56feaae54 | /9_ShootEmUp/main.py | 8e3aba25a4fcabab461c8765bf8e07872db4fee2 | [
"MIT"
] | permissive | tadachi/kb | c5436fcb93d939139c392d1e30d7e80d927d59ba | 3836fadda31fb1761beb913aa254d43c91847fe7 | refs/heads/master | 2021-01-14T13:40:10.978096 | 2014-11-22T16:59:25 | 2014-11-22T16:59:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,172 | py | main.py | from __future__ import division
from collections import namedtuple
import json
import math
from random import randint, random
from kivy import platform
from kivy.app import App
from kivy.base import EventLoop
from kivy.clock import Clock
from kivy.config import Config
Config.set('graphics', 'width', '960')
Config.set... |
3d4716f870f52f82a43c26ac3fbd6b1867652313 | 8747c46c79f7d412a65351e1ca37ed4f9dc7542f | /tests/test_diaryEntries.py | 32322bf9c4a101610db03264766b35e1acf35ea3 | [] | no_license | kcharles52/myDiary3 | b1672a73ba303654f8586edca5824aa43113e551 | b8c3cf7777a9a298f29ea3560236ab7f4f2e7c89 | refs/heads/develop | 2020-03-24T17:45:11.526215 | 2018-09-06T11:55:11 | 2019-01-03T10:32:19 | 142,870,076 | 0 | 1 | null | 2018-08-17T12:04:46 | 2018-07-30T12:06:29 | Python | UTF-8 | Python | false | false | 10,127 | py | test_diaryEntries.py | import json
from app.instance import app
from .test_base import BaseTestCase
class EntriesTest(BaseTestCase):
#tests for creating diary entry
def test_create_entry(self):
""" Tests whether a user can create an entry successfully """
self.test_client.post(
'/api/v1/auth/signup'... |
2d224ad3a5b49bb4158c02e9af4e8e5cd72717bf | 5be679b8d7e9adcffc5a626c224b055a4d3d750b | /School/views.py | 4b3d254ea69dc0fe154dd5389e30a021dee5a947 | [] | no_license | RathodVipul234/school-management | c90394c13c1cdaacb20c4aa79a8f5dcf7c523ea9 | 654f89039246941f91e8d4da92658d40044358c2 | refs/heads/master | 2023-06-22T11:28:25.676146 | 2021-07-29T05:23:20 | 2021-07-29T05:23:20 | 390,312,506 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 324 | py | views.py | from django.shortcuts import render
# Create your views here.
def home(request):
return render(request,'dashboard.html')
def aboutUs(request):
return render(request,'aboutUs.html')
def contactUs(request):
return render(request,'contactUs.html')
def policy(request):
return render(request,'policy.htm... |
aec037a7fefca715c97fcecaaa3d641ee2e45b80 | 6432eaef43338937b8c757bb73660933f9bf46d7 | /ws/management/commands/testPush.py | 7a60036e5ee519ec9cddc96353725d188c9067fe | [] | no_license | 31415li/source | daefec9dd668d51386e5c24e23f867d5b559a813 | ca8b8a1aeb5cfa48b9b73cf6b89faa6ff4a61c7d | refs/heads/master | 2023-03-15T09:08:25.364873 | 2018-06-06T00:56:54 | 2018-06-06T00:56:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,002 | py | testPush.py | # -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
from django.core.management.base import NoArgsCommand
from django.conf import settings
#from webbiodws.models import *
import json
from django.conf import settings
import csv
from datetime import datetime
impor... |
8ba4476f0747eb96b7ab401ca20a3716ab0ccc19 | ebc7607785e8bcd6825df9e8daccd38adc26ba7b | /python/baekjoon/2.algorithm/greedy/1041.주사위.py | bd886eecae491941482886fa305aebd43aff69ae | [] | no_license | galid1/Algorithm | 18d1b72b0d5225f99b193e8892d8b513a853d53a | 5bd69e73332f4dd61656ccdecd59c40a2fedb4b2 | refs/heads/master | 2022-02-12T07:38:14.032073 | 2022-02-05T08:34:46 | 2022-02-05T08:34:46 | 179,923,655 | 3 | 0 | null | 2019-06-14T07:18:14 | 2019-04-07T05:49:06 | Python | UTF-8 | Python | false | false | 1,446 | py | 1041.주사위.py | import sys
def solve():
global n, nums
if n == 1:
nums.sort()
print(sum(nums[:5]))
elif n == 2:
num_two = get_two_face_min_sum() * 4
num_three = get_three_face_min_sum() * 4
print(num_two + num_three)
else:
num_one = min(nums) * (pow((n-2), 2) * 5 + ... |
4ec3194f6f2059bc28abadd3b56e3b47f879a033 | 639c2f38c458d908b866fa96296b37de2f60bde5 | /Implementation/Print Hackerearth.py | e40fc7ba7f95aa275051b89a272410ff12d0c2df | [] | no_license | prashantktiwari/CodingfromScratch | bf75dd8377cae8835259b7ce4bc81883db5a46ac | 3dc91133a6a5b58fa565461b12ea75c3700cc9d1 | refs/heads/master | 2022-12-01T10:55:05.915765 | 2020-08-15T18:18:23 | 2020-08-15T18:18:23 | 274,191,425 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 303 | py | Print Hackerearth.py | import math
sl = int(input()) # length of a string
s = input()
a = []
a.append(math.floor(s.count('h')/2))
a.append(math.floor(s.count('e')/2))
a.append(math.floor(s.count('a')/2))
a.append(math.floor(s.count('r')/2))
a.append(s.count('c'))
a.append(s.count('k'))
a.append(s.count('t'))
print(min(a)) |
292266689e0e70b5125be1c9e1092cdf0b2563fc | 15f8aa7ba1c3e837174a9cfd983d6ceb51c6733a | /tests/tests.py | a78dc232102af990c44495ecc4727e7edce19cf4 | [] | no_license | kewtree1408/sitemapper | 8d0d6cbfe1912a1e05a82dc00e66c108798f381d | 01267872a5fe92a795762709f065e1a0e4d3c6b5 | refs/heads/master | 2021-01-01T18:43:35.101645 | 2017-07-26T16:25:39 | 2017-07-26T16:25:39 | 98,412,774 | 0 | 0 | null | 2017-07-26T16:02:12 | 2017-07-26T10:52:02 | Python | UTF-8 | Python | false | false | 2,111 | py | tests.py | import unittest
from lxml import etree
from utils import (
get_root_url,
iter_re_for_href,
xml_output,
)
class TestUtils(unittest.TestCase):
def test_get_root_url(self):
long_url = 'https://github.com/tox-dev/tox/blob/master/CHANGELOG'
short_url = 'https://github.com'
expected_... |
2a4e2f402183c0000394ced8b354304ff5c477e3 | 00228ccbebf750e0ae1bd30cb3f04b23f6bb1653 | /updateEmailConfig.py | 9a604ded5df5f97f60c7d73fa909957bad2a0c47 | [
"MIT"
] | permissive | linkhub-sdk/popbill.statement.example.py | e1c4f1930d6efd0b619be843cab3457200e9be1d | af4566c15a6d9cc7d9b9762d5baec42151c05f09 | refs/heads/master | 2023-08-17T09:51:17.398492 | 2023-08-11T15:32:22 | 2023-08-11T15:32:22 | 32,972,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,784 | py | updateEmailConfig.py | # -*- coding: utf-8 -*-
# code for console Encoding difference. Dont' mind on it
import imp
import sys
imp.reload(sys)
try:
sys.setdefaultencoding("UTF8")
except Exception as E:
pass
import testValue
from popbill import PopbillException, StatementService
statementService = StatementService(testValue.LinkID, ... |
7a46708890656a66c79a22add567c9f83ef2bbd0 | 4b9befc328ff2220b485527c667ce3efd66e1299 | /ideas/FirstDraft/Try1.py | a3023695c3814b774619c91e42ef0837bc64dcfd | [] | no_license | whurst1/BIOL4800FinalProject | 176d0db059a689c851ef0a929b0a7e326e96868f | 19c9336df984ad01e518b4859486d92c9efe48dc | refs/heads/master | 2020-04-09T09:40:08.465833 | 2018-12-03T19:09:41 | 2018-12-03T19:09:41 | 157,213,665 | 0 | 0 | null | 2018-11-12T12:55:52 | 2018-11-12T12:55:52 | null | UTF-8 | Python | false | false | 876 | py | Try1.py | #!/usr/bin/env python
class contig(object):
"""hold all short reads in contig"""
def __init__(self,length):
#list to hold reads
self.lists = []
#short reads generated in file are read in from file
file = open('shortread.txt', 'r')
lists = []
for reads in file.readlines():
lists.append(reads)
lists[:] = [line.rs... |
5b9f24e285703e7f97334789482177ed7234c80a | 0510111ec935ab65ebe6b247243be47c18126c74 | /core/commands/navigate.py | c631c03bd19419eadc4dea3ac5979459554f6632 | [
"MIT"
] | permissive | aziz/GitSavvy | 63597a6bc5e4ac8a072d76a74f6d7d046620180a | 45e93de4cb57403b04d45f27d91093daaf014707 | refs/heads/master | 2021-01-20T22:35:12.301102 | 2016-07-14T06:26:40 | 2016-07-14T06:26:40 | 61,583,953 | 5 | 0 | null | 2016-06-20T22:12:59 | 2016-06-20T22:12:58 | null | UTF-8 | Python | false | false | 1,233 | py | navigate.py | import sublime
from sublime_plugin import TextCommand
from ..git_command import GitCommand
class GsNavigate(TextCommand, GitCommand):
"""
Move cursor to the next (or previous).
"""
def run(self, edit, forward=True):
sel = self.view.sel()
if not sel:
return
curren... |
39b9ffb618b999be2f7fc173f2f115d3e7f2f1c1 | ce800ba14627c182d6f646d277b26d08aa7b05fe | /turtle/六边螺旋.py | 6c4efb4c7857a28588f512518a4b8997f1a621d8 | [] | no_license | 0Jvang/my-python-career | d547d6297c3445e063d85c31cfc81dce5644f4f0 | 58e4a3a10a66b53679a5420f32d8eb04a68a56cd | refs/heads/master | 2022-12-23T06:48:03.761934 | 2018-10-17T02:39:06 | 2018-10-17T02:39:06 | 153,385,496 | 0 | 1 | null | 2022-12-17T05:53:29 | 2018-10-17T02:44:39 | Python | UTF-8 | Python | false | false | 254 | py | 六边螺旋.py | from turtle import*
speed(0)
bgcolor('black')
sides=6
colors=['red','yellow','green','blue','orange','purple']
for i in range(250):
pencolor(colors[i%sides])
forward(i*3/sides+i)
left(360/sides+1)
pensize(i*sides/200)
hideturtle()
done()
|
48362ffccdf647309f2168e330ca0ffaffcf8ed8 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03290/s082806632.py | 0ab2684db91ed9ac0c77a872cdcf3bdf1ad7ec80 | [] | 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 | 606 | py | s082806632.py | import itertools
D, G = map(int, input().split())
ans = 10000000000
list_pro = [list(map(int, input().split())) for _ in range(D)]
for ptr in itertools.product([0,1], repeat=D):
cnt_pro = 0
res = 0
for i,k in enumerate(ptr):
if k == 1:
cnt_pro += list_pro[i][0]
res += 100 * (i+1) * list_pro[i][0] ... |
2a46337834f354c6e5e517e5157bc7c8fc39192c | 11eabe0100eecfa77a84e4f9b0909fe215fd0322 | /test/test_multivalues_insert.py | a775c9ea99480421628c6280076e6183d37eb151 | [
"Apache-2.0"
] | permissive | johnjdailey/snowflake-sqlalchemy | 0aecc4b39adbc34b55d3e2bbe5f600d0a4e39ed2 | 7c033c165739bcfe002391d356375a370a1db81c | refs/heads/master | 2022-07-14T16:45:59.742718 | 2020-05-19T00:45:09 | 2020-05-19T00:45:09 | 267,949,537 | 1 | 0 | Apache-2.0 | 2020-05-29T20:32:24 | 2020-05-29T20:32:23 | null | UTF-8 | Python | false | false | 1,161 | py | test_multivalues_insert.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved.
#
from sqlalchemy import Integer, Sequence, String
from sqlalchemy.schema import Column, MetaData, Table
from sqlalchemy.sql import select
def test_insert_table(engine_testaccount):
metadata = M... |
b05a40390b14793d24a0da8d8f6f0ca6fbfef4f1 | c2bc0f611aa45ee66bd5327e7088773b7c53e905 | /server/app/main.py | c88df3a0447fd31f111375d7769d37fab5219ce6 | [] | no_license | co1in9/ts-clockin | 0c102715402707b5e451af19395262d4ae213f0e | c17a5fa0a92c1e4f0e94670c35774061208e209c | refs/heads/master | 2023-02-19T03:53:50.147443 | 2021-01-20T10:48:17 | 2021-01-20T10:48:17 | 331,272,835 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 560 | py | main.py | from typing import Optional
from fastapi import FastAPI
from pydantic import BaseModel
from redis import Redis
import os
import json
class Request(BaseModel):
device: str
position_x: Optional[float]
position_y: Optional[float]
app = FastAPI()
redis = Redis(host="redis", port=6379, password=os.getenv('RED... |
7bb0139cf83a7d748d40bc308718fd2e2de34aaf | a4c003b50627ecbefc3bd96046e8ef37d6924e7a | /simple_network_sim/network_of_populations/report.py | da76deb1811c025ec671e98aedfccced1ff44e71 | [
"BSD-2-Clause"
] | permissive | ScottishCovidResponse/simple_network_sim | cdfc987ee5b14e8b581269f8f99969237569fd8c | 62c45717d81c203560eb52a411cd8176b5c8cdf5 | refs/heads/master | 2023-04-20T04:13:38.176560 | 2020-10-26T01:33:18 | 2020-10-26T01:33:18 | 256,781,833 | 6 | 4 | NOASSERTION | 2021-05-04T13:09:14 | 2020-04-18T15:03:39 | Python | UTF-8 | Python | false | false | 2,054 | py | report.py | # from simple_network_sim.network_of_populations import logger
# # NotCurrentlyInUse
# # this takes a dictionary of states at times at nodes, and returns a string
# # reporting the number of people in each state at each node at each time.
# # aggregates by age
# def basicReportingFunction(dictOfStates):
# reportS... |
8575412ca338cf5c64b7cee97d862c78f990a4b8 | 83e1f2c01a2aae34a3308b7d20cff997f8de3cc1 | /ex084.py | e6ae1fa225cb58ce48c7d65b6fc7bb86f800b374 | [] | no_license | ORodrigoFerreira/ExerciciosCursoemvideo | 634e81595ae2853667aae21f72cb0d9a0a810ded | 1a973d3db7ec0bc7b79c6c3027cbfe828f5560c4 | refs/heads/main | 2023-07-08T04:35:54.257470 | 2021-07-29T23:15:32 | 2021-07-29T23:15:32 | 358,718,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 666 | py | ex084.py | lista = []
pesados = []
leves = []
c = mai = men = 0
while True:
nome = input('Nome: ')
peso = int(input('Peso:'))
lista.append([nome, peso])
r = ' '
if len(lista) == 0:
mai = men = lista[0][1]
if peso < men:
men = peso
if peso > mai:
mai = peso
while r not in... |
f292dbf9b1d2a0ad849ead6d9aade6d4f45fa371 | 7608d1284bd7f7daf58816206dbf32280e0c7952 | /a2l_hex合成包/test/py3antlr4book-master/07-Property/test_as_loader.py | aba22dedd1e9422c597dbaca074133f2bb3acbff | [] | no_license | swift-tong/woocal-code | 0468326e29084c2e609d63da90c882e69ebfe211 | 2c79cdf4ddc6988247f641785b4f2c300e8fbc1b | refs/heads/master | 2020-07-23T21:02:07.452594 | 2019-09-24T07:56:59 | 2019-09-24T07:56:59 | 207,704,920 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 846 | py | test_as_loader.py | import sys
from antlr4 import *
from antlr4.InputStream import InputStream
from PropertyFileLexer import PropertyFileLexer
from PropertyFileParser import PropertyFileParser
class PropertyFileLoader(PropertyFileParser):
def __init__(self, input:TokenStream):
super().__init__(input)
self.props = {}... |
f8161271dfba466accfdc0523b8f0726438fbd74 | 2233a4f0e009ee7fa20ed32df19a1aa89e29897e | /schedule/migrations/0017_event_end_recurring_period.py | 9e11c180372ec842141110b852275c170c4276db | [] | no_license | jphalis/g-fitness | 1e366c2ffdd8f9230716c5bab0a77d6eb1dad02d | 13c99ce037def2ab24749919001055908245274d | refs/heads/master | 2023-01-07T19:33:41.169665 | 2016-02-23T03:09:42 | 2016-02-23T03:09:42 | 312,346,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | 0017_event_end_recurring_period.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('schedule', '0016_auto_20150313_1948'),
]
operations = [
migrations.AddField(
model_name='event',
nam... |
0b59073a0420522a6639c2c29c88a3a59e64e489 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03592/s656405543.py | 6f8b84c1626ed08bada5ed2bd15207fe20b1d931 | [] | 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 | 200 | py | s656405543.py | n,m,k=map(int,input().split())
flg=0
for i in range(n):
tmp=k-m*i
if n==i*2 or tmp<0:
pass
elif tmp%(n-i*2)==0 and 0<=tmp//(n-i*2)<=m:
flg=1
if flg==1:
print('Yes')
else:
print('No') |
9e558268675f3ccb293ae4fa4eabce11d34beb49 | 380b805b2ed60827b9f6135161a967b609517c42 | /URLShortener/__init__.py | e86be3436a3fc2e3e576fb5a98a1b8314ab97d67 | [] | no_license | navneetgoel/URLShortner | 6999536cd2cfd7545fe767e8542d05933576b63b | ed86ad0289066f70f50fc87e3de5018ee82530ce | refs/heads/master | 2023-01-03T03:29:06.333648 | 2020-10-25T05:10:46 | 2020-10-25T05:10:46 | 300,186,289 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,257 | py | __init__.py | import logging
from flask import Flask, json, request, redirect, render_template, make_response
from .compressURL import compressURL
from functools import wraps
from bernhard import Client
from riemann_wrapper import riemann_wrapper
import urllib.parse
app = Flask(__name__)
shrt = compressURL()
logger = logg... |
fd0b548ffd7bac14cd6eb577c7356fb455d5155b | 42899ec3a4b366d3ebb831078ce3b510ca1d1ed6 | /test3/js_iframe.py | d34aaad3012d1f289dd1856007c1732c6f8ba22f | [] | no_license | cuiyafei001/test | c6c3de76d3aa08ec52053a3fd8b1998c465d003b | 9a68aafb020a85ec06267c2eed5c6e4f9d14bb30 | refs/heads/master | 2021-09-21T01:04:46.021884 | 2018-08-18T15:30:45 | 2018-08-18T15:30:45 | 110,555,067 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,027 | py | js_iframe.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
# profileDir路径对应直接电脑的配置路径
profileDir = r'C:\Users\123\AppData\Roaming\Mozilla\Firefox\Profiles\cr0ic2ar.default'
profile = webdriver.FirefoxProfile(profileDir)
driver = webdriver.F... |
e33b6eccf1dd89b96d06e1e5ed6e3338c76dbca3 | b2b898494c610790e12beb77c265b1c4cc69eb3f | /lanenet/model/decoders.py | c162119dc123daf9aaf5b4a39319ab006290cfc4 | [
"MIT"
] | permissive | klintan/pytorch-lanenet | 56ed2144a61f8870a4bbb0f481a2a4e8dd74c8f3 | 284fed0fc2e4479ce4f30fccdcd00e469a954d09 | refs/heads/master | 2023-08-08T18:57:34.908865 | 2022-11-29T01:03:54 | 2022-11-29T01:03:54 | 171,403,090 | 219 | 64 | MIT | 2023-09-05T20:05:33 | 2019-02-19T04:08:43 | Python | UTF-8 | Python | false | false | 6,065 | py | decoders.py | import torch
import torch.nn as nn
DEVICE = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
class ESPNetDecoder():
def __init__(self):
# light-weight decoder
self.level3_C = C(128 + 3, classes, 1, 1)
self.br = nn.BatchNorm2d(classes, eps=1e-03)
self.conv = CBR(19 +... |
b2585ea159d98d0bf744545ac9dfc50059c7100d | a203d68714bb1fa1349a0ca4a5bbe24637e91299 | /code/exc/opdracht_8_pi4_2.py | 084c4d6f17f4d76fce0514dc5483aa3307867ba6 | [] | no_license | yoriaantje-dev/B1A09-Pi4-Deel2 | 856bea1786c03b8c994cd7a2efa99a192de610fc | dde4ecd3f57bff5abf9e1454f620f7a9406b5aef | refs/heads/master | 2022-04-10T03:12:37.694803 | 2020-03-21T19:30:27 | 2020-03-21T19:30:27 | 247,995,135 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,793 | py | opdracht_8_pi4_2.py | import pyodbc
import os.path
def connect_to_DB():
print("Creating Database connection...")
conn_str = (r"Driver={Microsoft Access Driver (*.mdb, *.accdb)};"
r"DBQ=C:\\Users\\yoria\\OneDrive - ZuydHogeschool\\HS Zuyd\\B1A09 - Databases\\Summatief\\Pi4 Deel2\\code pi4\\code\\Muziek.accdb")
co... |
5b4e4d218a60218a9ae8c2babb65e7af2fbffd10 | 3a3ff25e8da142ec99c1e95a6b8949757018dd1d | /thD7/video_scenes.py | ccca573ae5d03a8e551b8ffe1b5596e7a03f2035 | [
"MIT"
] | permissive | WRangers/manim | 5c64f137fec84692624470acf802497ddcf2ba29 | 38acb22c7e5c1a95afdf05678e07ad506513d676 | refs/heads/master | 2021-01-02T02:57:59.129073 | 2020-07-24T16:41:58 | 2020-07-24T16:41:58 | 239,647,790 | 1 | 1 | NOASSERTION | 2020-02-11T01:10:02 | 2020-02-11T01:10:01 | null | UTF-8 | Python | false | false | 8,885 | py | video_scenes.py | from manimlib.imports import *
from thD7.from_others.fourier_series import FourierOfPiSymbol
'''
Scenes for the series of signals and systems.
'''
class Preamble(Scene):
CONFIG = {
'c_title': '',
'e_title': '',
'series': None,
}
def construct(self):
set_gpus([0, 1])
... |
01537ccd03e35faa979ceb089234e0fb2c01bbdc | f0f2d5a8c8f0a6862bdd0387cb271333628834c2 | /inputting_csv.py | 2300a089e37dd7721c7c681933dd1ca08d01ba4d | [] | no_license | sj1young/Cloud-Storage-HW | 0db7eed9a2cfeab5feb0d8f382578d610c1c57ad | 6ad5ae6613137451d27f2cfc3a1838c253f2b43e | refs/heads/master | 2022-12-25T04:02:25.588941 | 2020-10-03T15:14:03 | 2020-10-03T15:14:03 | 300,300,625 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,091 | py | inputting_csv.py | import boto3
import csv
s3 = boto3.resource('s3', aws_access_key_id = 'AKIA4QBUGQUKMD4LPNUA',aws_secret_access_key = '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')
dyndb = boto3.resource('dynamodb', region_name = 'us-east-2', aws_access_key_id = 'AKIA4QBUGQUKMD4LPNUA',aws_secret_access_key = 'jkG6dbRwE8eSuphpjw++AU1LawsL... |
b5428d9a6b41ddf9a303810bb21edfd19a9c70e1 | a6794984a5641b16f035226720fdfaaaf8a729e0 | /count divisor.py | b8be49e8c27a26a737d963111d15bd43081ffe5a | [] | no_license | v1dhn/Hackerearth-Solutions | d3a5f65388b639fcbe0d37f117cf1e602d781050 | 9257d92398fa21d7ea3c7e5009fdfa4c6a3f2345 | refs/heads/master | 2022-07-07T01:40:21.300998 | 2020-05-11T07:40:21 | 2020-05-11T07:40:21 | 262,972,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 524 | py | count divisor.py | '''
# Sample code to perform I/O:
name = input() # Reading input from STDIN
print('Hi, %s.' % name) # Writing output to STDOUT
# Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
'''
# Write your code here
flag=True
a=input()
b=input()
... |
2c5d8fa9735e6c37838392a51319c8fba6c9df45 | fcba77a01f1202b2c83675ac11764bd35d0e3ddd | /otherPractice/ed video exercises/desk_shuffle.py | 37805cb46e5d46067ade4782b9d4ec83772d085b | [] | no_license | LorenBristow/module2 | f55094950b853b84630486f3a1847c14d31ddfed | a47e19eae03d543ca7e0224a46ac819238c2711c | refs/heads/master | 2020-04-08T16:39:19.668263 | 2019-01-27T00:47:19 | 2019-01-27T00:47:19 | 159,528,460 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,046 | py | desk_shuffle.py | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 3 14:33:17 2018
@author: loren
"""
##NOTES, COMMENTS, PROBLEMS, TO-DOS:
##some people sat at ends i.e did not actually sit next to neighbour in the list
##people may want to change direction? C
##HeinLoren not seen as same as LorenHein so need to create an expanded list ... |
90b751e4ac6a294ad601d7ebee49603efbe6e383 | 274f4e72563b60d085997182fafcdd87f1f7e965 | /com/week8/am/folium1.py | 96e519ee5075d78ae3092701bc245f99cafbc8e1 | [] | no_license | Kyeongrok/python_yla | ef9d4ab8ac72eb980d117a418d3d3a6cd608c445 | 9ba25ec9bf795eba0a293ac74fd94636e6f07f6d | refs/heads/master | 2020-04-24T17:45:44.823713 | 2019-04-29T11:52:42 | 2019-04-29T11:52:42 | 172,158,026 | 2 | 3 | null | 2019-04-20T10:01:46 | 2019-02-23T01:39:42 | HTML | UTF-8 | Python | false | false | 97 | py | folium1.py | import folium
map_seoul = folium.Map(location=[37.5665, 126.9780])
map_seoul.save('seoul.html') |
b7d8111916801c71d4377e930b3ce5247a75ba13 | b7d6f0131e267d342546ff2da659948a1cb3efce | /nefertari_mongodb/signals.py | a46f76727c6eff83cb459535a981a5b17fa5cd86 | [
"Apache-2.0"
] | permissive | howaryoo/nefertari-mongodb | 5b16b244ad5c592459b97b1d3acff7b652cce05f | 3e549d309d1aac2ed66c49aa85d109433987185d | refs/heads/master | 2020-12-27T15:28:46.044610 | 2015-04-07T18:31:39 | 2015-04-07T18:31:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 930 | py | signals.py | import logging
from mongoengine import signals
log = logging.getLogger(__name__)
def on_pre_save(sender, document, **kw):
from nefertari.elasticsearch import ES
if not kw.get('created', False) and document._get_changed_fields():
ES(document.__class__.__name__).index(document.to_dict())
def on_pos... |
ebb0591a31c8bc915273d22031370bf6349e997c | 765e195e5f84914427d7c44c5fa5292c716cfacb | /compiler.py | c3649cb416784d1d32c428cfaefcf897455657b2 | [] | no_license | CostyRo/TimathonJune | 3fbad31615e459156c2b1f0477e0f426180c81f8 | 75728c96ce8de0cef1158214de8dc1097d4ba972 | refs/heads/main | 2023-06-12T18:02:37.625509 | 2021-07-02T20:37:47 | 2021-07-02T20:37:47 | 380,818,757 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | compiler.py | import streamlit as st
import functions
import compilerstrings
def app():
functions.preparePage()
st.warning(compilerstrings.uf)
language=st.selectbox(compilerstrings.choose,compilerstrings.programmingLanguages)
col1,col2=st.beta_columns(2)
with col1: code=st.text_area("Write your code here: ","",250)
with ... |
1698833f4b0811caa30ebe8c1ab77e2d1ac8a2f2 | e6612c0b12412c2851d4fe065c04851f70062684 | /bubblesort.py | e931d55ffb0b2979a1ca2b753197d1026346d0c7 | [] | no_license | ShivamSherkar23/Data-Structures | 0cc61872c3ae0ee16663332032aff5375440adde | ead25d5a2c8171409c63b0e593f95d1646efbdfe | refs/heads/master | 2022-12-22T14:31:13.156342 | 2020-09-13T09:58:23 | 2020-09-13T09:58:23 | 274,175,328 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 242 | py | bubblesort.py | def bubbleSort(arr):
for i in range(len(arr)):
for j in range(0,len(arr)-i-1):
if arr[j]>arr[j+1]:
arr[j],arr[j+1]=arr[j+1],arr[j]
arr = l = list(map(int,input().split(' ')))
bubbleSort(arr)
print(arr) |
84e3539070b6c30f561067271c1c4b77de022af5 | bee4d5a48e414fb53a3b6a79fa2f70d19af2513f | /4.函数式编程/2.返回函数.py | f3aacda5b2b16574283fc9bb7ff990d18b16687a | [] | no_license | Kycer/python-learning | b2e090842b6083dbe3f495d9be3f129c03bcd41a | f88f7d527ef92b71321b04cbd296cc09490d539f | refs/heads/master | 2020-03-26T14:01:42.927746 | 2018-08-19T15:11:18 | 2018-08-19T15:11:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,557 | py | 2.返回函数.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 函数作为返回值
# 通常情况下,求和的函数是这样定义的:
def calc_sum(*args):
ax = 0
for n in args:
ax = ax + n
return ax
# 如果不需要立刻求和,而是在后面的代码中,根据需要再计算怎么办?
# 可以不返回求和的结果,而是返回求和的函数:
def lazy_sum(*args):
def my_sum():
ax = 0
for n in args:
ax = ... |
e1b8ef065fa77967a1434c26a4c58b03a54608fe | a7ae53a7a1ed55ace48643cfd776604e2923d323 | /tasks/t2/lvn/util.py | d41be33e60106b67c3b8fe7154f1f6f28be5cda4 | [
"MIT"
] | permissive | hj424/bril | e442339a5c54c7a4f9f9e033b90b2ad2ce52a6b5 | a00df97a33aaa76c37035297474548e3f2019e69 | refs/heads/master | 2023-02-03T12:18:02.593925 | 2020-12-22T14:25:06 | 2020-12-22T14:25:06 | 295,436,538 | 4 | 0 | null | 2020-09-14T14:11:02 | 2020-09-14T14:11:01 | null | UTF-8 | Python | false | false | 757 | py | util.py | # Helper functions
import itertools
def form_instr_dict(file_name):
# open the file
f_ptr = open(file_name, "r")
if (not f_ptr):
print("! Can't open file: "+file_name)
instr_list = {}
line = f_ptr.readline()
while line:
instr_list.append(line)
# read new line
line = f_ptr.readline()
# ... |
e11132b12c248a4c2bf87b5dbcd1490da931887f | f9586a6907223582c0e8d2fa1a84986fe987207a | /Src/Generic_Arinc_IO_types/ComplicatedProcess.py | 4be04608bb41d323e5eb025bc020ebf81e913f36 | [] | no_license | AntonGulkevich/SccLibPython | 46b22aee529babfc93bb6cc3314d9020c90453fd | 32ecd8f948d5ab3f310d17e32d72c7212f915ca2 | refs/heads/master | 2021-08-07T03:28:36.497969 | 2017-11-07T12:02:18 | 2017-11-07T12:02:18 | 109,002,956 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,913 | py | ComplicatedProcess.py | from abc import ABCMeta, abstractmethod
from multiprocessing import Process, Event, Manager
from time import sleep
from Src import MediatorClientWrapper as Proxy
from Src.MediatorClientWrapper import LibError
from Generic_Arinc_IO_types.IOSettings import IOSettings
from ArincTypes import Mode
class ComplicatedProces... |
abe618148a148230d887b5f9ff0b76d53c37ce25 | 798459489389377dff3b244f00ee68841171d4d0 | /src/boss_uclvac_creation.py | d714decd62bd6f111eff21e98bc61aea355fbcc2 | [] | no_license | tbs1980/CosmicCrossCorrelation | 2e59d1fcf050fa674ca2836a2be1b2d1b8a1b7c3 | 2c9be57f86988347e9e3996ae0c358d89845ae98 | refs/heads/master | 2021-01-25T03:49:21.940504 | 2015-02-02T14:51:57 | 2015-02-02T14:51:57 | 21,977,788 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,102 | py | boss_uclvac_creation.py | from __future__ import division
import numpy as np
from astropy.table import Table
import os
import argparse
def main(infile, sample, outdir):
"""
fixme
fixme-fixme-fixme
"""
boss = Table.read(infile, format="fits")
# PART 1: Restrict to official DR10 redshift range
redshift = boss['Z']
... |
7632c0a35a7667f09da18618b6f0519ba69aef89 | 0cc543d8c14ad344a606ca4cd8e194c3c0799b90 | /p1_Analysis/baselineshift.py | f05c654009214ec046c383d12eb9d08343e34648 | [] | no_license | TimothyRE99/2019_Summer_PMT_Waveforms | 1274680e4997459a3348a0d0fae046da39d7f4f1 | ad269b4a16963574d143f094e27ae1529a614d1b | refs/heads/master | 2021-06-13T08:33:59.186757 | 2021-05-12T21:45:42 | 2021-05-12T21:45:42 | 186,650,756 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,847 | py | baselineshift.py | #Remove baseline from files to line up closer to 0
#import necessay
import numpy as np
from readwaveform import read_waveform as rw
from writewaveform import write_waveform
import os
#shift baseline
def baselineshift(datadate,numhead):
Nloops = len(os.listdir('G:/data/watchman/'+datadate+'_watchman_spe/d1/d1_rena... |
d3fe8ee2c68d2f75c1512d56d19761acde86070e | 238f837e975742ae3cc66799fc6e911a836c44f2 | /websockets/server.py | 078155850d0d2d1f47c06919ec00bf7bb1331426 | [
"BSD-3-Clause"
] | permissive | njouanin/websockets | 3bfd104d9cbdbfc0177e7c9171d17d99fd4ece2b | 0c43316b07e93bddb3a688a104713f8a91dfaff5 | refs/heads/master | 2020-12-25T13:44:34.910748 | 2015-07-28T20:41:01 | 2015-07-28T20:41:01 | 40,090,364 | 0 | 0 | null | 2015-08-02T19:28:21 | 2015-08-02T19:28:20 | null | UTF-8 | Python | false | false | 8,879 | py | server.py | """
The :mod:`websockets.server` module defines a simple WebSocket server API.
"""
__all__ = ['serve', 'WebSocketServerProtocol']
import asyncio
import collections.abc
import email.message
import logging
from .exceptions import InvalidHandshake, InvalidOrigin
from .handshake import build_response, check_request
from... |
9a25d2f3153919cc8647f64887c42b1bf8d5f212 | a7bdecf855e98bd859ddd7275415b150b8fca2e3 | /OLDBOY/day10/协程.py | 0799c8cf755576af41f3dc01380c2e137c16e641 | [] | no_license | qgw258/python | dfa0cb21e4438f2e36d64d716753bf8ae45892b8 | 266d873dadd9bd60a42f43334cd92037d1aaf1cd | refs/heads/master | 2023-02-16T01:43:16.611105 | 2020-12-09T08:59:27 | 2020-12-09T08:59:27 | 281,035,465 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,970 | py | 协程.py | __author__ = 'qgw'
'''
协程,又称微线程,纤程。协程是一种用户态的轻量级线程。
协程拥有自己的寄存器上下文和栈。协程调度切换时,将寄存器上下文和栈保存到其他地方,
在切回来的时候,恢复先前保存的寄存器上下文和栈。
因此:
协程能保留上一次调用时的状态(即所有局部状态的一个特定组合),每次过程重入时,
就相当于进入上一次调用的状态,换种说法:进入上一次离开时所处逻辑流的位置。
协程的好处:
1、无需线程上下文切换的开销
2、无需原子操作锁定及同步的开销
"原子操作(atomic operation)是不需要synchronized",所谓原子操作是指不会被线程... |
d4e5b74e3a2aa3c68894b5b054cdbdaa89a3c516 | caac7c48da48ff7b1cb566f22e1ba6baa2360f92 | /webserver_learn/server.py | 302d7fa767ea5885ced36eb726cbb9e1d1c416eb | [] | no_license | cld-santos/webserver-learn | 2a906a6403ecfb93a557216cc37f4b62b998a582 | ae095d4bca82d062fc72cd1e221e3b4bb67a1f44 | refs/heads/master | 2022-12-12T13:24:12.058047 | 2018-04-15T23:19:53 | 2018-04-15T23:20:17 | 129,619,622 | 0 | 0 | null | 2022-12-08T01:05:34 | 2018-04-15T14:44:56 | Python | UTF-8 | Python | false | false | 728 | py | server.py | import re
from http.server import BaseHTTPRequestHandler
from http import HTTPStatus
class HTTPHandler(BaseHTTPRequestHandler):
def do_GET(self):
matched = re.match(self.path_pattern, self.path)
if matched:
self.send_response(HTTPStatus.OK)
self.send_header("Content-type",... |
57914a39882d942ba6e30dc3984fd66f439b3bee | 374556da1912b72604ec503b94272c66eb3b3fef | /setup.py | ae634bfd94506dd0947cb3625f20d5422e06ffa4 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | michael-lazar/hue-pad | b86c9b32f2d48dcad3de3fb79403cb00a18d1e3c | 96a93618f36b1b0a805c7c02a692fe33e14d5877 | refs/heads/master | 2021-01-20T09:44:48.257265 | 2017-08-29T05:21:01 | 2017-08-29T05:21:01 | 101,602,181 | 12 | 2 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | setup.py | import setuptools
setuptools.setup(
name='hue_pad',
version='0.1.0',
description='Control lighting effects with a MIDI Pad Controller',
url='https://github.com/michael-lazar/hue-pad',
author='Michael Lazar',
author_email='lazar.michael22@gmail.com',
license='MIT',
py_modules=['hue_pad']... |
82f09f1bb152b9ec11e85f348bb55044dec5d802 | c34482f37d8e059ab4bffa50a109a85184865b59 | /code/move_files.py | f931c27b0d5c5a2af701440a0330fc7a0986327f | [] | no_license | gtm2122/deep_measure | 10a34294c97e233f8d795f2a84b11f8716996772 | fa35560d42eeb83ed458901c44efe97855249ffd | refs/heads/master | 2021-07-03T00:27:05.282208 | 2017-09-25T16:15:31 | 2017-09-25T16:15:31 | 104,269,166 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,502 | py | move_files.py | import pandas as pd
import os
from shutil import copyfile
# d = pd.ExcelFile('/data/Gurpreet/Echo/Excel_Files/VC16_04082017_ArrangeData.xlsx').parse('All_Data')
# name = []
# names = d['Pat Name']
# Vids = d['Vid Name']
# ge_vings = [i for i,ele in enumerate(list(d['Manufacturer'])) if ele=='GE Vingmed Ultrasound']... |
ab5117706d0ec0a71d322e837b8913dfb4ff5168 | 1f0284b803503fd5beaac5e3e5bfaee54df05d97 | /model/SendEmail.py | f8ac47b5ec285d9c38a63d68232d84d4ecf4daeb | [] | no_license | yushu1987/UI | f3113670b5fecb953a98ddd0cdc0762460f774ed | 86bb051e62abdf2ed5bbdbea4c9008a6c1f49060 | refs/heads/master | 2020-11-24T14:17:09.336424 | 2019-04-10T08:43:16 | 2019-04-10T08:43:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,515 | py | SendEmail.py | import smtplib
import os
import sys
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
from model.Yaml import MyConfig
from config_path.path_file import read_file
from model.HtmlDataHandle import AmilSupport
class... |
efc184bd79ccbac8b4b8efac0df3427a2f5663d7 | 450bb34c9e2e1b1627bd00f824ea179884219db2 | /Balanced_Brackets.py | 7b000ad90bcc149fc3bf1cf360dfc90b96242414 | [] | no_license | ShraxO1/Cipher_Schools | 5754f5a4ba0994a32c64f4eab3264d3c185711af | d8e707f15afca127178d94757457803b17841813 | refs/heads/master | 2022-11-29T11:24:17.897463 | 2020-08-07T19:49:28 | 2020-08-07T19:49:28 | 285,908,707 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 562 | py | Balanced_Brackets.py | from collections import deque
def checkbalance(string):
stack=deque()
for i in string:
if i=='{' or i=='(' or i=='[':
stack.append(i)
else:
if not stack:
return 'NO'
temp=stack.pop()
if i==']' and temp=='[':
continue
elif i=='}' a... |
02c868f7ac54ca809eb9ec2ad68fe257c19c2b8b | 7ac85f980970da709d2312b5e5baa8506577009e | /beta/v2.x/v2.4.py | 2ea90b3bb95d5a145c5ed55d4a77813d2a55684a | [
"MIT"
] | permissive | viva9grup/sudos | acb7c92c2d4c92919ece531d5b06beac78939239 | 93a2ed57bfbeb608fd4ed1b2a204a6d9f7709d2c | refs/heads/main | 2023-07-15T08:35:48.871302 | 2021-08-07T06:36:56 | 2021-08-07T06:36:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,083 | py | v2.4.py | #!/usr/bin/env python
#version: 1.0 release
import threading
import argparse
import random
import atexit
import socket
import socks
import time
import ssl
import sys
active_connections = 0
connection_limit = 0
active_threads = 0
max_threads = 100
delay = 1
hrs = 0
total_hrs = 0
total_connected = 0
user_agents = [
... |
7990c6d5a37c02a01a6825ec5f611bb3c64169b8 | 40bbf743e5af2b1ce96959e3a73ca94d0b84910a | /hetzner/web_api.py | b21fa64db53b8a4f1a2ce71af075d5bca43112ff | [] | no_license | mehulsbhatt/hetzner-cost-estimator | 0932b18293d383e996ce708256abb9e0de611536 | a020e7369359654261e56e62214dd8861210813d | refs/heads/master | 2017-12-04T11:08:50.291733 | 2017-03-25T08:53:36 | 2017-03-25T08:53:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,910 | py | web_api.py | import requests
from bs4 import BeautifulSoup
class HetznerWebAPI:
def __init__(self):
# self.jar = CookieJar()
self.session = requests.session()
def __enter__(self):
return self
def __exit__(self, exc_type, exc_value, traceback):
self.session.close()
def login(self, ... |
2395983505411956e1c0ae2a53321651a37a9e16 | 6a0e51fc8d2ea8819711acb7948f4c21c277c771 | /homework4/1.py | 46c082d15dd845e431bf7f2fa60a244c34152075 | [] | no_license | sunzhiyan/Python | eb0bd60edbc85e670ad02af9009df53f5936bff3 | 3881d124b71f81b7e0bd1e70bcd336238fbcfa3f | refs/heads/master | 2022-10-08T21:38:22.799102 | 2021-03-05T02:32:57 | 2021-03-05T02:32:57 | 244,139,633 | 1 | 0 | null | 2022-09-23T22:42:18 | 2020-03-01T11:50:40 | Python | UTF-8 | Python | false | false | 500 | py | 1.py | # -*- encoding: utf-8 -*-
'''
@File : 1.py
@Time : 2020/04/06 21:20:30
@Author : xdbcb8
@Version : 1.0
@Contact : xdbcb8@qq.com
@WebSite : www.xdbcb8.com
'''
# here put the import lib
from collections import deque
import datetime
q=deque([1,2,3,4,5,6,7,8,9,10])
a=datetime.datetime.now()
q.appendleft(11... |
77472ffbbcc2963bbd1ecb1a2dcf771ad428dfd0 | 4e55acacf64c4b5e39ae6579b0e0cbad041f510b | /d3/5248_그룹나누기(N)/tmp.py | 1676403aa485ee58c8dbcfbce115bdabdaaa2585 | [] | no_license | hrk09/SWEA | 24635d4ea5ab7b77f772bb042acb59e1348dcb03 | 7c75788dcac86b7e4971f93ef031a6b3098e951b | refs/heads/master | 2022-03-12T15:03:59.554947 | 2019-11-09T10:34:03 | 2019-11-09T10:34:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 824 | py | tmp.py | import sys
sys.stdin = open('input.txt', 'r')
TC = int(input())
for t in range(1, TC+1):
n, m = map(int, input().split())
adj = list(map(int, input().split()))
group = []
tmp = set()
for start in range(0, 2*m, 2): # 시작노드
end = start+1
if not tmp: # tmp에 아무것도 없으면, 첫 값 넣어줌
... |
ffebc46c42e6f9080f406e89e48f0e5d7a17e9be | d5efb88e4f1e98dd877f7469c6c916d69d197a15 | /myvenv/lib/python3.5/rlcompleter.py | 90cd2ba2470b0c07037a874f4fa2d7d5ef35b0f6 | [] | no_license | Andreilys/djangoblog | 6ace871d1d1edfaa8268458a9104664ef8721ef5 | a5317a98bb60ce7171277b8cbc1d10df6e5a17e6 | refs/heads/master | 2021-01-21T13:30:09.956455 | 2018-08-15T04:38:57 | 2018-08-15T04:38:57 | 102,130,652 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 57 | py | rlcompleter.py | /Users/andreilyskov/anaconda/lib/python3.5/rlcompleter.py |
5e1cb6ab34e6f2511bb9250f4001b7f8342ccd78 | 9d7d0c13f8c43878edd45d0d77c8acf8f0d66f8b | /Bot.py | ccb6eab9fe21efbab6890a8c5f833f800612fede | [] | no_license | LuizCarlosVilela/Bot-youtube | a21a09248c0f7b6239ba5922f652e326b3564bba | 7523b3c03f0ab57fde4f8043f3e0abce4be4ad00 | refs/heads/master | 2022-07-17T18:09:56.024737 | 2020-05-18T22:13:47 | 2020-05-18T22:13:47 | 265,075,152 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | Bot.py | import os
import time
import pyautogui
while True:
os.startfile('https://www.youtube.com/watch?v=mAOPYIqhaj8')
time.sleep(45)
pyautogui.click(1343, 13)
|
13238c983cde9a225dde938a3af9951007655753 | 02be0a7e81e04956f0f5a2263879104a37f9d06f | /testy1.py | 71c4210444b50d3085a7b6f908270c125e7fe509 | [] | no_license | ShveczovaKS/ShKs | cb2c61e2d14badcebf97b08dc45391a55ca35f40 | cfd6b2d3d89d41471db4fb62c939e942123933c3 | refs/heads/master | 2023-04-10T23:17:29.795752 | 2021-03-14T22:37:04 | 2021-03-14T22:37:04 | 342,329,298 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 45 | py | testy1.py | print("Hello world!")
print("My name Ksenia") |
dc8f3a3d4b97218662cb53025887b5193bf8466b | cc4179dceb10673f32964b7c26669deeaa93db27 | /UVA-673/UVA-673.py | a95f67ae9063b33f1ead1f66ac0d75532c4af2a7 | [] | no_license | ThomasCampredon/OS02TPTD1 | ba4418afa9c4a8b4b9da8847ed8c8332e0c51f1c | 949acce524818fe994845de5c86049895c023be2 | refs/heads/master | 2020-12-15T13:10:13.385848 | 2020-02-14T13:56:36 | 2020-02-14T13:56:36 | 235,113,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,288 | py | UVA-673.py | import sys
while True:
lines = sys.stdin.readlines()
while lines[-1] == '\n':
del lines[-1]
for line in lines :
compteurParOuv = 0
compteurParFer = 0
compteurCroOuv = 0
compteurCroFer = 0
parOpenNow = 0
croOpenNow = 0
estYes = True
... |
b8fac2efa93e8c61ed485d3d6b520cae697cb5d8 | cd84230bd9b168c7911f2266a705251b80d212bd | /Tkinter/04_entry.py | 8dae0566d0040a75687a004ab4f82e12cea2c0d8 | [] | no_license | highgon2/PythonTest | f8b38fc6d9eab6d536591b785acc94049765cdb7 | 1b1bab38e8b09db1084d2abec1d9ea294bfb2de1 | refs/heads/master | 2023-06-25T01:58:11.178296 | 2021-07-28T01:50:06 | 2021-07-28T01:50:06 | 169,029,837 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 360 | py | 04_entry.py | import tkinter
from math import *
windows = tkinter.Tk()
windows.title("Entry Test")
windows.geometry("480x320+100+100")
windows.resizable(0, 0)
def calc(event):
label.config(text="result = " + str(eval(entry.get())))
entry = tkinter.Entry(windows)
entry.bind("<Return>", calc)
entry.pack()
label = tkinter.Label(wi... |
17d4e24a04fad8f0195547fff2b6663bdd6ff10b | b2f6513dac5f6cac0a6fa4c7cc639f37fd056b36 | /mit6.00.1x official/week_2_Simple_programs/ 4.-Functions/eval_quadratic.py | 63521a86069c81f584c521d4dfc07bd7f266d4da | [] | no_license | pnijhara/python-practice | de09a62bc821f591116f58d631502884eb3e083b | e95ed7ef723ca8492f700c1864240f4682a58b72 | refs/heads/master | 2020-03-19T18:03:01.033909 | 2018-09-21T08:29:35 | 2018-09-21T08:29:35 | 136,791,326 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | eval_quadratic.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 27 17:56:28 2018
@author: prime
"""
def evalQuadratic(a, b, c, x):
'''
a, b, c: numerical values for the coefficients of a quadratic equation
x: numerical value at which to evaluate the quadratic.
'''
# Your code here
return... |
74d0ca11de377815a623da07e67748380a212154 | 6c2169ce3fe95acec1cb504b48bfdaca0ef5f857 | /data structures/arrays/Left Rotation.py | 8485775fe79ebd300632f46aa0e304a8dc08f811 | [] | no_license | m-e-r-l-i-n/hackerrank-solutions | 082c23261a24f690bca2860aeedb8e15734000f1 | 9d5ed6df3003abca9e392fb49d15e68a6b9e3be6 | refs/heads/master | 2023-06-06T22:21:42.216750 | 2021-07-08T06:58:44 | 2021-07-08T06:58:44 | 249,380,504 | 1 | 1 | null | 2020-09-30T20:35:29 | 2020-03-23T08:56:39 | Java | UTF-8 | Python | false | false | 380 | py | Left Rotation.py | #!/bin/python
import math
import os
import random
import re
import sys
if __name__ == '__main__':
nd = raw_input().split()
n = int(nd[0])
d = int(nd[1])
a = map(int, raw_input().rstrip().split())
if(n >= 1 and n <= 10**5 and d >= 1 and d <= n):
dup = []
dup = a[d:n] + a[0:d]
... |
c2a731fe666794605b207b6e8f2ba5a3163131a7 | d453ed1485bec722d450fd1dd5f93d0d7214d48a | /classroom/views.py | 4267688ee37a4ded4775ee85becdf9a545f21919 | [] | no_license | Umair700/classroom | 082e849551011adcc5d4fdfb614c2400f7356712 | d0c1408c2150845fca401e6059f7474dbd14dc9e | refs/heads/master | 2023-04-08T06:36:06.228916 | 2021-04-12T18:02:50 | 2021-04-12T18:02:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,865 | py | views.py | from django.contrib.auth import authenticate, login, logout
from django.db import IntegrityError
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse
from django.http import JsonResponse
from django.contrib.auth import _get_user_session_key... |
12856a94a2967ab1c3736266b3be7b8ba66ef39b | e41066124907fbc9e139660884cd1a08976a0638 | /app.py | 35166f4a372fbb17fe6933f44c061628af3ae008 | [
"MIT"
] | permissive | egy21/churn_model | b8788832bf51689d007a86f6abffed352e4085b4 | 6b0d9d5da6a4c3e68748894128164c75cc56accd | refs/heads/main | 2023-08-30T17:02:11.954034 | 2021-11-03T18:38:45 | 2021-11-03T18:38:45 | 422,741,063 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,024 | py | app.py | from flask import Flask, render_template, request, jsonify
import os
import numpy as np
import yaml
import joblib
webapp_root = "webapp"
params_path = "params.yaml"
static_dir = os.path.join(webapp_root, "static")
template_dir = os.path.join(webapp_root, "templates")
app = Flask(__name__, static_folder=static_dir,t... |
e5dde2f157c29f8251718dd7dcb5c29139ffde3f | 03c4bff614702639d0ba2da99e23b55a96863066 | /main/src/general/Connect_G.py | e41a94cefa2ee672acca1d6b9bb7aed9ba081132 | [] | no_license | wangwuli/XLauto | dcaa9320c62ea78cbddad46bd65dab04ee87ba61 | 88705807df697dc86a5ed8a648505b3fb895872b | refs/heads/master | 2023-01-10T04:40:32.976245 | 2021-02-23T16:50:34 | 2021-02-23T16:50:34 | 223,140,055 | 1 | 0 | null | 2022-12-12T03:55:39 | 2019-11-21T09:43:56 | Python | UTF-8 | Python | false | false | 7,141 | py | Connect_G.py | # -*- coding: utf-8 -*-
'''
@author: liww
@file: Connect_G.py
@time: 2019/12/5 17:02
@desc:
'''
from itertools import zip_longest
import os
import shlex
import subprocess
import uuid
import paramiko
class Sshmet():
#测试调整,待完善
def __init__(self):
self.execcmd_out = '' #执行结果
self.execute_resul... |
b1a677f628c1cda94505e6e6db8970f3657db3d8 | ae90864ffefaae65da9c6e1809bf27208a9d34fc | /EXAMPLES/API/invalid_create_setting_from_json.py | ade6eda04a9d47a341e68748531fe82dd3851944 | [] | no_license | apDataGuy/pytan | 6374f128c4b4070d041d8bfb05c22e2434ff4a68 | 24c2907e28b3a93f3a96aa4cb42933ed2c6f83bf | refs/heads/master | 2021-01-16T22:10:31.715453 | 2015-03-26T17:32:11 | 2015-03-26T17:32:11 | 38,935,203 | 0 | 0 | null | 2015-07-11T17:56:56 | 2015-07-11T17:56:56 | null | UTF-8 | Python | false | false | 2,335 | py | invalid_create_setting_from_json.py |
"""
Create a setting from json (not supported!)
"""
import os
import sys
sys.dont_write_bytecode = True
# Determine our script name, script dir
my_file = os.path.abspath(sys.argv[0])
my_dir = os.path.dirname(my_file)
# determine the pytan lib dir and add it to the path
parent_dir = os.path.dirname(my_dir)
pytan_roo... |
700a866041154904a3c0b50b875b0b9f7af9d6c6 | ea5ce74e989328d4744a6da74480ea0b1b2d5189 | /ADS-Regs-Code/freeway/spawn_NPC_for_overtaking.py | 5b746ca5a42f9cd52fa0f0b6969a66cc44493136 | [] | no_license | xuhan417/githubrep | fec59f50996b7bcae2c5f848beb412af79821f55 | 7efc721048f7f419a224e4356ede74477fc242c0 | refs/heads/main | 2023-02-13T00:31:57.252291 | 2021-01-06T00:32:14 | 2021-01-06T00:32:14 | 312,742,617 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,164 | py | spawn_NPC_for_overtaking.py | """Spawn NPCs into the simulation for freeway scenario"""
import glob
import os
import sys
import time
try:
sys.path.append(glob.glob('../carla/dist/carla-*%d.%d-%s.egg' % (
sys.version_info.major,
sys.version_info.minor,
'win-amd64' if os.name == 'nt' else 'linux-x86_64'))[0])
except Inde... |
e73fd14a8a620290e24717dad36abaffc2313cf7 | 90843838ffc62df4f46c444e039ce39da0db4671 | /chapter13/09_pract3.py | b4a2b67796da4dfbed7047edbd0568700f32fb08 | [] | no_license | jayesh580/my_python | 27a55c6ee1070426708dace51ab5ca9a2e4d6936 | 640cc4dbee70c62d78916fd897dc62a0223fc4da | refs/heads/master | 2023-05-08T00:49:13.954055 | 2021-06-06T12:02:12 | 2021-06-06T12:02:12 | 374,348,120 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 83 | py | 09_pract3.py | list = [str(7*i) for i in range(1, 11) ]
vertical = "\n".join(list)
print(vertical) |
fd104c71b2ff36c5a622e71a1ed2e0fa3baa2443 | a206a1a9f6fb9eabd927a76b517c71d4a0f887ec | /44_sendOutlookMail.py | fa7f3f67fa78ca8202fb44f3f3f07aed933cfcde | [] | no_license | himanshu0ranjan/Python | 6fbccc074478b27d91fcc49cfba62990a54bf574 | cc499e5648fc7d971d1bdd1cda6c5319adae5317 | refs/heads/master | 2021-07-26T12:56:41.741046 | 2017-11-06T19:38:29 | 2017-11-06T19:38:29 | 108,743,933 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,361 | py | 44_sendOutlookMail.py | '''
Created on Sep 13, 2017
@author: Himanshu Ranjan
'''
import psutil
import os
import subprocess
import win32com.client as win32
def send_notification():
outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = 'youremail@example.com'
mail.Subject = 'Messa... |
8b2786d692c5814f18b7e097ba60c320fec19f32 | 4dc8ed71b761e62041c110bb153a5bb5ea49015a | /api/host.py | d65e6e4a551de0f2a1aeda960f21badeb0e58a14 | [] | no_license | semtexzv/insights-host-inventory | 3ef9caccc1b586e69249a9e230e16015d37d76e5 | 45851897d8ebcc3d71870ea89867ccfc79679d1c | refs/heads/master | 2020-09-24T02:56:46.335112 | 2019-11-27T18:24:35 | 2019-11-27T18:24:35 | 225,645,133 | 0 | 0 | null | 2019-12-03T14:51:58 | 2019-12-03T14:51:57 | null | UTF-8 | Python | false | false | 17,873 | py | host.py | import uuid
from datetime import datetime
from datetime import timezone
from enum import Enum
import flask
import sqlalchemy
import ujson
from flask_api import status
from marshmallow import ValidationError
from sqlalchemy.orm.base import instance_state
from api import api_operation
from api import metrics
from app i... |
606a8db70e70052045e25a06e7ec0a0ee0cb57de | f84a690c252c5b1b50d596e8a276c33d594ab5ad | /apps/main/sitemap.py | 8f9bac62c9eeefaa76726c6192d128d04e623aa4 | [] | no_license | zaebee/yasenput | 72dc74424b1edec5f6209eb49120d5ed2fbf8843 | 5826601c1236f5b66fff7b95afd9cc3339d96606 | refs/heads/master | 2021-01-19T14:30:20.106382 | 2015-02-17T14:09:26 | 2015-02-17T14:09:26 | 39,384,789 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 439 | py | sitemap.py | from django.contrib.sitemaps import Sitemap
from apps.main.models import Points
from apps.trips.models import Trips
class TripsSitemap(Sitemap):
changefreq = "daily"
priority = 0.2
def items(self):
return Trips.objects.all()
class PointsSitemap(Sitemap):
changefreq = "daily"
priority =... |
0914e5c7a3b9e7a2f6fd515bf4e8e9440ffa094a | cca697cfad70501f1ca43f099e67496abea55244 | /facturacion/migrations/0003_auto_20170719_1605.py | 5e44236a0c30e2ea0c1d0127fb2edf17f24bd699 | [] | no_license | CornelioJ97/VentaSystem | e3eacad48e159e3b91ac3b7ad3f6343148a07541 | 0156f75aca28c400fd0837053654ce9a74f35ec4 | refs/heads/master | 2021-01-01T17:20:49.742302 | 2017-07-25T15:31:58 | 2017-07-25T15:31:58 | 98,056,912 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,238 | py | 0003_auto_20170719_1605.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-07-19 22:05
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('facturacion', '0002_auto_20170719_1551'),
]
operatio... |
c438e50c042b5ae5a42c9639fc2cd69d7be50e72 | e10c47020c1e03f978528d1ae326224cd3806a49 | /realtors/models.py | 8681f0ba31284d209abc7d06738815cc6bc0b5c7 | [] | no_license | chaudhary003/myproject | 6769d11b1e5322c5b2eb196a39bba81b50d81f2c | a05dfcb3f244bfb21b62ab66ac04ab7ee220f4fd | refs/heads/master | 2022-07-15T19:21:04.912547 | 2020-05-12T11:43:07 | 2020-05-12T11:43:07 | 259,598,172 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 385 | py | models.py | from django.db import models
# Create your models here.
class Realtor(models.Model):
first_name=models.CharField(max_length=200)
last_name=models.CharField(max_length=100)
email=models.EmailField()
contact=models.CharField(max_length=100)
display_pic=models.ImageField(upload_to='image')
def __... |
bfa1a2a1886ef682fb72704885cb0c66e5c780a0 | 621a40fa363dc0c32c96a4c8fdfe9142877e2ff1 | /ietf/submit/parsers/pdf_parser.py | 56496bbd8a959606d6bb222b103bd346c4c446b8 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | omunroe-com/ietfdb2 | d9c40bebe4b25059f810c70dd1370cca30cb3c36 | aeaae292fbd55aca1b6043227ec105e67d73367f | refs/heads/master | 2020-04-04T21:05:56.067430 | 2018-11-05T09:08:27 | 2018-11-05T09:08:27 | 156,273,382 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | pdf_parser.py | from ietf.submit.parsers.base import FileParser
class PDFParser(FileParser):
ext = 'pdf'
mimetypes = ['application/pdf', ]
# If some error is found after this method invocation
# no other file parsing is recommended
def critical_parse(self):
super(PDFParser, self).critical_parse()
... |
af7226fbf0569e4b34e35d6e35759d7d28054aea | 9726a4de50ffdc56df1095e23f5cda39d4b89788 | /src/python/team2doc.py | 7b649a49417801aec04388c356468101c317838a | [] | no_license | Joaquimmnetto/tribunal-data | 27c8b4c743e3c221c749273e9354bc5041268289 | fb66a57dc7d47014e6d8918533ca70dbd3f1c8b5 | refs/heads/master | 2021-08-11T11:15:35.710782 | 2017-11-13T16:08:29 | 2017-11-13T16:08:29 | 98,463,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,972 | py | team2doc.py | import sys
import collections
import csv
import nltk
import gensim
import pickle
model_dir ="../../data/full/samples" if len(sys.argv) < 2 else sys.argv[1]
out_dir ="../../data/full/samples" if len(sys.argv) < 3 else sys.argv[2]
min_count = 50 if len(sys.argv) < 4 else sys.argv[3]
chat_fn = model_dir+"/sample/chat.... |
5821add61630af46d72a1ad6b3d92d94831b86af | 9d1741782aead4712be9e9b4d8d16106f72fba6d | /urbansound/utils.py | 21e0d3d03b5a6ba53755137048b3caf253ac3080 | [
"MIT"
] | permissive | pspeter/urban-sound-CO2 | 94280d02b82a673667a7e382d8d26134674bf9f6 | 031ec9af2caa8fc9a6c9974f84f4c51b53e8837f | refs/heads/master | 2021-07-25T20:08:24.819675 | 2020-01-30T09:16:29 | 2020-01-30T09:16:29 | 130,838,327 | 3 | 0 | MIT | 2020-04-01T20:48:09 | 2018-04-24T10:40:36 | Python | UTF-8 | Python | false | false | 217 | py | utils.py | import os
from pathlib import Path
from typing import Union
def ensure_dir(path: Union[str, Path]) -> None:
directory = os.path.dirname(path)
if not os.path.exists(directory):
os.makedirs(directory)
|
6f1d5f01ebaa88212c4198f5bc2e58ba45413b69 | 582866df7b1662d13efd692ff9a2d0d0b9641bd3 | /predict_glare.py | 5d5bb5618c2bb1717e0b189795f1a572278c97a2 | [] | no_license | daviesje/Glare_Classifier | ce163d155ec3b1002ef9cc5008e3ecf19f683ce9 | b8460857da1eb6428881468cf775160f6612bd0d | refs/heads/master | 2020-09-22T17:18:18.554826 | 2019-12-02T04:53:25 | 2019-12-02T04:53:25 | 225,283,680 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,427 | py | predict_glare.py | import numpy as np
from keras.datasets import mnist
from keras.models import load_model
from matplotlib import pyplot as plt
from matplotlib import gridspec
import sys
import dset
import models
image_fn = sys.argv[1]
model_name = sys.argv[2]
suffix = sys.argv[3]
inshape = dset.set_inshape(np.array([32,32,3]))
#th... |
8a2538e9a0300a097cd9715e7bbfa11684e61500 | 3a1f696274e5bc437e57acfd451ae196bdd1b722 | /homework1/AI_homework_1_宋品皓_1901213096/resnet.py | e8180256cf1b7dab10ec2a054f564cdf93f00b30 | [] | no_license | Ryanrenqian/AI_HW | bca8987ac6c787d2ec10efce90449678c7a001ec | a4c9f8abbe158ac591c5755dcc439e6a420923b4 | refs/heads/master | 2020-08-11T12:47:32.568123 | 2019-12-17T03:33:24 | 2019-12-17T03:33:24 | 214,567,342 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 8,504 | py | resnet.py | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 15 16:08:08 2019
@author: Dell
"""
import torch
from torch.autograd import Variable
import torchvision
import torchvision.transforms as transforms
import os
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import matplotlib.pyplot as plt
... |
c93963b3debe3ccd1d05935888d4fb37470b14cb | 468fa25f6e2a0bfd4d56564bd04b5826241f2ed2 | /Gra_w_zgadywanie_liczb_2_flask.py | efbd6463bbe6f51f56903e385f65f7faf96e0505 | [] | no_license | Patryk-Baracz/Warsztat_01 | 0b75e5ec132ad1a5a5f9ff997ada552a7f8d3899 | eafc6a4af7cdc1e205d14ae7d15de4c4e8c56982 | refs/heads/main | 2023-01-19T08:31:19.120088 | 2020-11-23T10:27:32 | 2020-11-23T10:27:32 | 314,513,980 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,373 | py | Gra_w_zgadywanie_liczb_2_flask.py | from flask import Flask, render_template, request
app = Flask(__name__)
def guess(max_l, min_l):
return int((int(max_l) - int(min_l)) / 2 + int(min_l))
@app.route('/', methods = ["GET", "POST"])
def zgadywanka():
if request.method == 'GET':
return render_template('zgadywanka.html')
else:
... |
b7a36425e9d1648d54396291c990a7524215e31c | a455addf0d11d28011af118508fb265332060830 | /imdb_rest/movies/movies.py | d20717fcd9876548ca41c3aaa62dcccf56091c4d | [
"MIT"
] | permissive | onlined/imdb-importer | 081d0c8a8d97b7c11f3b085a0d50c79c51599dd9 | c15bfd7d0ab16c66dfd0d50f85521638765917e6 | refs/heads/master | 2020-08-27T07:30:25.968076 | 2017-11-27T04:13:25 | 2017-11-27T04:13:25 | 217,285,223 | 0 | 0 | MIT | 2019-10-24T11:42:38 | 2019-10-24T11:42:38 | null | UTF-8 | Python | false | false | 3,678 | py | movies.py | from flask import request, jsonify, abort
from peewee import SQL
from . import mod_movies
from imdb_rest.models import Names, Titles, ManyNamesHasManyTitles
@mod_movies.route('/movies_by_start_year')
def movies_by_start_year():
""" Retrieves list (in alphabetical order) with
all titles of movies indicated by ... |
5f5b3177de7753bfca28ec49382962229ac2fd2b | 3ede63923b62cf5483090c880a1b8e019d8e137f | /apps/flexer/migrations/0005_auto_20180823_1622.py | b3c52270939a6f717e9e91375207a4ae3e5a6271 | [] | no_license | flexflexflex/flex | defbd2c48a3d02975e8837a2070cd6826c3909bc | afb27a4152e0d17887cc46cd4b5fbd6aea8073bc | refs/heads/master | 2022-12-12T16:42:12.242564 | 2019-02-08T09:31:34 | 2019-02-08T09:31:34 | 145,876,059 | 0 | 0 | null | 2022-11-22T02:52:27 | 2018-08-23T15:54:16 | CSS | UTF-8 | Python | false | false | 1,089 | py | 0005_auto_20180823_1622.py | # Generated by Django 2.1 on 2018-08-23 16:22
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('flexer', '0004_auto_20180823_1619'),
]
operations = [
migrations.CreateModel(
name='Flex',
... |
d544c4ef58d61f67445e68b31a7ee798e8044ebb | 6353c59b9b5151ff85f08b8e6d6b95082da42e74 | /untitled2/project/security/migrations/0012_document_docfile.py | da2b4ff5feab216ef03a8a7e544b3d894fa50f5a | [] | no_license | asifazamali-zz/SystemSecurity | 58a5c6eedbfbe37f5db30b1db8249a6e3b1e4b80 | c7af1f2e7a475d4e47f980aa2cfa20107bce69f7 | refs/heads/master | 2021-06-03T02:58:48.256978 | 2015-10-14T18:50:49 | 2015-10-14T18:50:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 483 | py | 0012_document_docfile.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import security.models
class Migration(migrations.Migration):
dependencies = [
('security', '0011_remove_document_docfile'),
]
operations = [
migrations.AddField(
model_n... |
3d9c79cff2162ca6a503fd6181192e284bd64fc6 | 63ce467657cdb39fb78e7ace6f337a30707f9580 | /test/input_schema_test.py | fce5eed6dadb72b20508ee3a311f33ac5926d739 | [
"Apache-2.0"
] | permissive | socrata/socrata-py | b753045460e18014589920e8a772f5c4f919f870 | acfae68a53a8c1849cb3942f7d3ac35b0c21b8ad | refs/heads/main | 2022-12-27T00:17:31.450285 | 2022-11-30T18:35:25 | 2022-11-30T18:35:25 | 83,365,653 | 67 | 23 | Apache-2.0 | 2022-12-14T18:50:42 | 2017-02-27T22:57:14 | Python | UTF-8 | Python | false | false | 1,014 | py | input_schema_test.py | import unittest
from socrata import Socrata
from test.auth import TestCase
class TestInputSchema(TestCase):
def test_transform(self):
input_schema = self.create_input_schema()
res = input_schema.transform({
'output_columns': [
{
"field_name": "b",
... |
9d8f2acfce003b0420f62ec62ecaa76d4f9e55c6 | 6a4e14d38349e714c93e0fe2b5a12d3f92755bdd | /Term 1/SE/PycharmProjects/pythonProject/Tut2/Word Separator.py | 68e38fb6cf2dcb3774474b5c8e5ce046caf87ebd | [] | no_license | krissmile31/documents | 56d0488db52051be2c38ae8239bab55b37771400 | 946295c2ee9c0491a823c2c72cb56eca9b141b7d | refs/heads/master | 2023-07-03T18:53:47.094762 | 2021-07-29T10:40:20 | 2021-07-29T10:40:20 | 390,643,771 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 667 | py | Word Separator.py | #input a string
sentence = input("Enter a sentence (all of words are run together but the first character of each word is uppercase): \n")
# Convert sentence: words are separated by spaces, lowercase and capitalise
def convert(sentence):
#initialise result
word = ""
#loop over elements in sentence
... |
581d38fab5e493b2ff92619db148ee26d6b31694 | 41677ae967b76d6f93707a2814fe760529be9a30 | /crypto/wheeeeeeeeeeeeeeeeeeeeeee/wheeeee.py | e7e86133fce510f84e7233fbb4f68a3c648d4cc5 | [] | no_license | modulexcite/plaidctf2014 | b2aa74240fb4f4733933a68af974f24bb8d72f95 | 1bf225f52a6501dac74044b176df39538de34c43 | refs/heads/master | 2021-05-26T10:23:59.456246 | 2014-05-02T16:02:42 | 2014-05-02T16:02:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,883 | py | wheeeee.py | from hashlib import sha512,sha1
import random
KEY = [0, 0]
M = 12
N = M * 2
K = N
numrounds = 2 ** 24 # Protip: would not bruteforce this if I were you.
def genTable(seed="Function shamelessly stolen from bagre"):
fSub = {}
i = 0
prng = sha512()
prng.update(seed)
seed = prng.digest()
cSeed = ""
for x i... |
9b1d3fc2aba32f0f1c3084e2ab1e944be879edac | 8a3a4b97a22e81459b0900972620133625ad29fd | /users/urls.py | b8222c680afc2edb799a7f2c2f654c90f2689d2e | [] | no_license | alexisMoragaa/manageProjects | a65c54ebf5229b2664c95547652f74e213fcb342 | d3f32522312e27dab3f2df20c125e30c1f56cb97 | refs/heads/master | 2023-06-16T23:48:59.916514 | 2021-06-30T03:58:03 | 2021-06-30T03:58:03 | 367,960,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 119 | py | urls.py | from django.urls import path
from .import views
urlpatterns = [
path('login', views.login_view, name= 'login')
] |
17dd5093af4020d0e7721205ae369ded5f2fe1ef | 7132e51f3052fbcbc9f4d10977797c2dbd6a9804 | /update_db.py | 345b4098224c9bfb4514b3087e77a8dd54cde44f | [] | no_license | adamrk/weather2 | 53c7f399a1f795ac7371552f5c1aab2f8eff5bb4 | 5256ce3662a1b1f0862d2e4c29d149b3482cec2b | refs/heads/master | 2022-12-09T23:49:52.322671 | 2017-04-06T13:50:29 | 2017-04-06T13:50:29 | 72,934,655 | 0 | 0 | null | 2022-12-07T23:39:56 | 2016-11-05T15:25:00 | Python | UTF-8 | Python | false | false | 2,325 | py | update_db.py | from extract import (get_data,
get_temp_rain,
agg_data,
get_actual_json,
get_actual_temp_rain)
from db import Forecast, Crag, Actual
from setup import db
from sys import argv
from datetime import datetime, timedelta
import logging
log = logging.getLogger('app')
offline = 'offline' in argv
def upd... |
8c24916e93e4c932791d11241629c5533c5dcf9a | 7263e68d0be5855784be62458dc311f597446504 | /check/check_prop_cyly.py | 84cae22c919252f2d12a91d28d0aed57ca1598c6 | [] | no_license | ElegantPath/DC_regression | 5c6a184b230e41d9c304c1f9081f481855058b3e | 82906cda6559d0f2231c5d026e734909bb81b419 | refs/heads/master | 2022-12-07T07:17:52.115638 | 2020-07-13T03:51:40 | 2020-07-13T03:51:40 | 279,196,069 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,208 | py | check_prop_cyly.py | # coding: utf-8
# @file check_prop.py
# @details python script
# @author 11055
# @data 2019/9/9 9:58
import pandas as pd
from .interface_check import InterfaceCheck
class CheckProp(InterfaceCheck):
def __init__(self, *args, **kwargs):
self.data = {}
self.aggr = kwarg... |
eea74b7a86e2d91e556f2e256b9af9a2335c27a7 | 3e20ba14c16476089bcac2cc9edc660410c15e52 | /create_memory_layer.py | 56a4d582671ee109d81674932a7e7aa4a3d7eb66 | [] | no_license | mlaloux/PyQGIS-console_Scripts | a8bff67e4d7e7c33cf443ef2d40082c2876d29ee | 741b3d1a9fe3fb4d316f347372d91b7a217e6c19 | refs/heads/master | 2020-05-16T23:17:44.623250 | 2014-01-02T13:10:41 | 2014-01-02T13:10:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,572 | py | create_memory_layer.py | #!/usr/bin/python
# encoding: utf-8
"""
fonction et classe permettant de créer des couches virtuelles (memory layers) Quantum GIS
Martin Laloux 2012
class and function to create memory layers from the Python Console (geometry only)
"""
from qgis.core import *
class Crea_couche(object):
"""création d'une couch... |
8641d4bd31a2c7b3bbb9fffdf4ca0e5199b86881 | 4673a7f576cd4f6d4996e1b22b42cd4090c381aa | /viz_tools.py | d2d1e29b8602d6592362897cc8acb79900a3a6bf | [] | no_license | sachabinder/Burgers_equation_simulation | 0ed51f020681e7a6ded8addad11b4eef9f24854c | 07d384640c015bcc1107c5ebc76e7f388eba6f88 | refs/heads/main | 2023-06-24T11:26:39.329084 | 2021-07-25T15:08:26 | 2021-07-25T15:08:26 | 389,301,915 | 14 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,268 | py | viz_tools.py | """
File with several visualization functions intended to be used
with results from 1D Burgers' equation simulation
"""
############## MODULES IMPORTATION ###############
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.animation as animation
fro... |
3cfe76dda8defc88373058708bd2fd90dbc6b1c1 | 696b5e9326c5e69e9fd803b0d63c984915e2e1ad | /algorithm/test_53_int_triangle.py | 1a90f11e1b38ed5ea915c1752f2ffe786872da2c | [] | no_license | doitfor10/my_algorithm | 21aedbc6a9746ca99f61dea0eaa4760be641369b | 918b9054b7202c432d9e94d39955457894b5353d | refs/heads/main | 2023-04-01T07:25:49.101728 | 2021-04-11T14:44:20 | 2021-04-11T14:44:20 | 347,369,766 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 600 | py | test_53_int_triangle.py | # 백준 정수 삼각형 https://www.acmicpc.net/problem/1932
import sys
case = int(sys.stdin.readline())
triagle = []
for _ in range(case):
triagle.append(list(map(int,sys.stdin.readline().split())))
for i in range(1,case):
for t in range(0,len(triagle[i])):
if t ==0 : #i-1도 인덱스 0번만 가능.
triagle[i][t]+= tri... |
862107c8efe0abc6bb89879aacb47871b14586ad | 244a8de7e9618a25e08c6f8c52b80f0e88fcf2aa | /plot/plot_a_pri.py | 5a36d0d878d3c4b332c6d4a8c360d07523304a0e | [] | no_license | chenIshi/3ManGamble | f68e72d4cdaaf1f3a11f645be8f89966de79762e | d109ea651d95987c3aa4fd83285a9d834abd4b3a | refs/heads/master | 2020-09-23T02:37:34.995278 | 2019-12-06T13:53:39 | 2019-12-06T13:53:39 | 225,381,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 909 | py | plot_a_pri.py | from matplotlib import pyplot as plt
import numpy as np
import math
from scipy.optimize import curve_fit
from scipy import asarray as ar,exp
from sklearn import linear_model
file_path = '../out/a_out.txt'
with open(file_path) as fp:
line = fp.readline()
result = eval(line)
value_s = [ i for i in result.keys()]
va... |
ae3de0b0d1679fd9811a0c16ee322391fead5e7c | 9dc423fe2c14e3949a171b81da9d02f87b1c2063 | /day05/wtforms实例/简单的验证登录.py | 378bacd99c2c21505775d235cd763ef6d912a650 | [] | no_license | 1751660300/Flask | a09ca944f21070cc04116d5fb929cacf386e56cd | 9fbf6955649f0c5e2e7acd98b29e28ebfdb99cd7 | refs/heads/master | 2022-11-09T13:10:45.462516 | 2020-06-28T02:47:19 | 2020-06-28T02:47:19 | 271,776,011 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,680 | py | 简单的验证登录.py | # -*- coding:utf-8 -*-
from flask import Flask, render_template, request
from wtforms import Form, validators
from wtforms.fields import *
from wtforms import widgets
app = Flask(__name__)
class LoginForm(Form):
'''Form'''
name = simple.StringField(
label="用户名",
widget=widgets.TextInput(),
... |
6cf7e9b8528674618b2b2ee4f32e01f795885ce0 | ac1ff0f8fcac6996e054104ce25d8c133d9f21f6 | /tests/test_list.py | 2abeb074ff8e02fb628931920606bae9cec7b7f5 | [] | no_license | PiJoules/python-type-inference | 6991a08b45e3e25eb208031504570f245b45c1dd | 4037fff6a7ec875ed9ecae9ae159d24401bd5f47 | refs/heads/master | 2021-01-11T11:40:28.858985 | 2017-04-06T04:04:51 | 2017-04-06T04:04:51 | 76,822,126 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,281 | py | test_list.py | import unittest
from inference import ModuleEnv
from builtin_types import *
class TestListType(unittest.TestCase):
NON_EMPTY_LIST = LIST_CLASS.from_list([{INT_TYPE}])
def test_empty_list_creation(self):
"""Test that I can make an emptylist."""
code = """
x = []
"""
env = ModuleEnv()
... |