Skip to content

Instantly share code, notes, and snippets.

View s910324's full-sized avatar
Code'em all

99% s910324

Code'em all
View GitHub Profile
import pya
import math
class Toolkit(object):
def __init__(self):
super(Toolkit, self).__init__()
def sin(deg):
return math.sin(Toolkit.deg_2_arc(deg))
def cos(deg):
import pya
import math
class CircularGroups(pya.PCellDeclarationHelper):
def __init__(self):
super(CircularGroups, self).__init__()
self.param("l", self.TypeLayer, "Layer", default = pya.LayerInfo(1, 0))
self.param("c_i_diameter", self.TypeDouble, "circle Diameter (initial)", default = 2)
self.param("c_d_diameter", self.TypeDouble, "circle Diameter (delta)", default = 1)
self.param("i_count", self.TypeInt, "circle per layer (initial)", default = 12)
Private Declare PtrSafe Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Type boundboxType
Left As Double
Top As Double
Width As Double
Height As Double
Bottom As Double
Right As Double
xc As Double
Private Type boundboxType
Left As Double
Top As Double
Width As Double
Height As Double
Bottom As Double
Right As Double
xc As Double
yc As Double
End Type
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://patents.google.com/patent/**
// @grant none
// @require https://cdn.jsdelivr.net/npm/sweetalert2@9
// ==/UserScript==
Sub dimension_arrow(direction As String, label_text As String)
Dim ActiveShape As Shape
Dim selected_shape As Shape
If ActiveWindow.Selection.ShapeRange.Count > 0 Then
For Each selected_shape In ActiveWindow.Selection.ShapeRange
If selected_shape.Type = msoLine Then
x1 = selected_shape.Left
y1 = selected_shape.Top
import concurrent.futures
import requests
import time
URLS = [
'https://docs.python.org/3/library/ast.html',
'https://docs.python.org/3/library/abc.html',
'https://docs.python.org/3/library/time.html',
'https://docs.python.org/3/library/os.html',
504b 0304 1400 0000 0800 59ab b44c 3d83
28c4 7d05 0000 7710 0000 1000 0000 696d
6167 6520 736c 6964 652e 6874 6d6c bd58
598f d330 107e 47e2 3f98 70b5 6293 362d
87e8 85b8 1e78 e010 8b40 0810 7263 b7f1
36b1 83ed 6e5b 56fd efcc d839 5a76 81ad
1064 4563 3bf3 cd7c 339e 1927 8cae 3d7b
fdf4 ddc7 37cf 496a f36c 72f5 caa8 ba5b
6133 3ef9 d08f 9e1e 1f8f 3a6e 86cb 39b7
9448 9af3 7170 2af8 aa50 da06 2451 d272
# coding: utf-8
import sys
reload(sys) # Reload does the trick!
sys.setdefaultencoding('UTF8')
from PySide.QtCore import *
from PySide.QtGui import *
import math
class Widget(QWidget):
def __init__(self, parent=None):
import sys
from PySide.QtCore import *
from PySide.QtGui import *
from Demo_calculator_ui import Ui_MainWindow
class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
self.setupUi(self)
self.ConvertButton.clicked.connect(self.Convert)